IDLgrModel

A model object represents a graphical item or group of items that can be transformed (rotated, scaled, and/or translated). It serves as a container of other IDLgrModel objects or atomic graphic objects. IDLgrModel applies a transform to the current view tree.

Superclasses

This class is a subclass of IDL_Container

Subclasses

The following classes are subclassed from this class:

Creation

See IDLgrModel::Init

Methods

Intrinsic Methods

This class has this following methods:

Inherited Methods

This class inherits the following methods:


IDLgrModel::Add

The IDLgrModel:: Add procedure method adds a child to this Model. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] Add, Object

Arguments

Object

An instance of an atomic graphic object or another model object to be added to the model object.

Keywords

POSITION

Set this keyword equal to the zero-based index of the position within the container at which the new object should be placed.


IDLgrModel::Cleanup

The IDLgrModel:: Cleanup procedure method performs all cleanup on the object. IDLgrModel is described above.

Calling Sequence

OBJ_DESTROY, Obj

or

Obj -> [IDLgrModel::] Cleanup                               ( In a subclass' Cleanup method only .)

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrModel::Draw

The IDLgrModel:: Draw procedure method draws the specified picture to the specified graphics destination. This method is provided for purposes of sub-classing only, and is intended to be called only from the Draw method of a subclass of IDLgrModel. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] Draw, Destination, Picture

Arguments

Destination

The destination object ( IDLgrBuffer , IDLgrClipboard , IDLgrPrinter , or IDLgrWindow ) to which the specified view object will be drawn.

Picture

The view (an instance of an IDLgrView object), viewgroup (an instance of an IDLgrViewgroup object), or scene (an instance of an IDLgrScene object) to be drawn.

Keywords

There are no keywords for this method.


IDLgrModel::GetByName

The IDLgrModel:: GetByName function method finds contained objects by name and returns the object reference to the named object. If the named object is not found, the GetByName function returns a null object reference.

IDLgrModel is described above.

Calling Sequence

Result = Obj -> [IDLgrModel::] GetByName( Name )

Arguments

Name

A string containing the name of the object to be returned.

Object naming syntax is very much like the syntax of a Unix filesystem. Objects contained by other objects can include the name of their parent object; this allows you to create a fully qualified name specification. For example, if object1 contains object2 , which in turn contains object3 , the string specifying the fully qualified object name of object3 would be 'object1/object2/object3' .

Object names are specified relative to the object on which the GetByName method is called. If used at the beginning of the name string, the / character represents the top of an object hierarchy. The string '..' represents the object one level "up" in the hierarchy.

Keywords

There are no keywords for this method.


IDLgrModel::GetCTM

The IDLgrModel:: GetCTM function method returns the 4 x 4 graphics transform matrix from the current object upward through the graphics tree. IDLgrModel is described above.

Calling Sequence

Result = Obj -> [IDLgrModel::] GetCTM()

Arguments

There are no arguments for this method.

Keywords

DESTINATION

Set this keyword to the object reference of a destination object to specify that the projection matrix for the View object in the current tree be included in the returned transformation matrix. The resulting matrix will transform a point in the data space of the object on which the GetCTM method is called into a normalized coordinate system (-1 to +1 in X, Y, and Z), relative to the View object that contains the model object.

TOP

Set this keyword equal to the object reference to an IDLgrModel object to specify that the returned matrix accumulate from the object on which the GetCTM method is called up to and including the specified model object.


IDLgrModel::GetProperty

The IDLgrModel:: GetProperty procedure method retrieves the value of a property or group of properties for the model. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] GetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrModel::Init

ALL

Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with this object.

PARENT

Set this keyword equal to a named variable that will contain an object reference to the object that contains this object.


IDLgrModel::Init

The IDLgrModel:: Init procedure method initializes the model object. IDLgrModel is described above.

Calling Sequence

Obj = OBJ_NEW('IDLgrModel')

or

Result = Obj -> [IDLgrModel::] Init( )         ( In a subclass' Init method only .)

Arguments

There are no arguments for this method.

Keywords

Properties retrievable via IDLgrModel::GetProperty

HIDE (Get, Set)

Set this keyword to a boolean value indicating whether this object should be drawn:

LIGHTING (Get, Set)

Set this keyword to one of the following values to indicate whether lighting is to be enabled or disabled for all atomic graphic objects that have this model as a parent. IDLgrModel objects that have this model as a parent will not be effected, as they have their own value for this property. If this value is set to 0, any lights added as children of this model will be used to illuminate any other models in the view hierarchy that have lighting enabled.

NAME (Get, Set)

Set this keyword equal to a string containing the name associated with this object. The default is the null string, ' '.

SELECT_TARGET (Get, Set)

Set this keyword to tag the model object as the target object to be returned when any object contained by the model is selected via the IDLgrWindow::Select method. By default, an IDLgrModel object cannot be returned as the target of a SELECT operation since it contains no geometry.

TRANSFORM (Get, Set)

Set this keyword to a 4x4 transformation matrix to be applied to this object. This matrix will be multiplied by its parent's transformation matrix (if the parent has one). The default is the identity transformation matrix.

UVALUE (Get, Set)

Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.


IDLgrModel::Remove

The IDLgrModel:: Remove procedure method removes an atomic graphic object or model object from the model. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] Remove, Object

Arguments

Object

An instance of an atomic graphic object or model object to be removed from the model object.

Keywords

ALL

Set this keyword to remove all object from the container. If this keyword is set, the Object argument is not required.

POSITION

Set this keyword equal to the zero-based index of the object to be removed. If the Object argument is supplied, this keyword is ignored.


IDLgrModel::Reset

The IDLgrModel:: Reset procedure method sets the current transform matrix for the model object to the identity matrix. IDLgrModel is described above.

Obj -> [IDLgrModel::] SetProperty, TRANSFORM=IDENTITY(4)

Calling Sequence

Obj -> [IDLgrModel::] Reset

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrModel::Rotate

The IDLgrModel:: Rotate procedure method rotates the model about the specified axis by the specified angle. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] Rotate , Axis, Angle

Arguments

Axis

A three-element vector of the form [ x , y , z ] describing the axis about which the model is to be rotated.

Angle

The angle (measured in degrees) by which the rotation is to occur.

Keywords

PREMULTIPLY

Set this keyword to cause the rotation matrix specified by Axis and Angle to be pre-multiplied to the model's transformation matrix. By default, the rotation matrix is post-multiplied.


IDLgrModel::Scale

The IDLgrModel:: Scale procedure method scales the model by the specified scaling factors. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] Scale , Sx, Sy, Sz

Arguments

Sx, Sy, Sz

The scaling factors in the x , y , and z dimensions by which the model is to be scaled.

Keywords

PREMULTIPLY

Set this keyword to cause the scaling matrix specified by Sx, Sy, Sz to be pre-multiplied to the model's transformation matrix. By default, the scaling matrix is post-multiplied.


IDLgrModel::SetProperty

The IDLgrModel:: SetProperty procedure method sets the value of a property or group of properties for the model. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] SetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrModel::Init


IDLgrModel::Translate

The IDLgrModel:: Translate procedure method translates the model by the specified translation offsets. IDLgrModel is described above.

Calling Sequence

Obj -> [IDLgrModel::] Translate , Tx, Ty, Tz

Arguments

Tx, Ty, Tz

The offsets in X , Y , and Z , respectively, by which the model is to be translated.

Keywords

PREMULTIPLY

Set this keyword to cause the translation matrix specified by Tx, Ty, Tz to be pre-multiplied to the model's transformation matrix. By default, the translation matrix is post-multiplied.