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.
This class is a subclass of IDL_Container
See IDLgrModel::Init
The IDLgrModel:: Add procedure method adds a child to this Model. IDLgrModel is described above.
The IDLgrModel:: Cleanup procedure method performs all cleanup on the object. IDLgrModel is described above.
NOTE: Cleanup methods are special lifecycle methods , and as such cannot be called outside the context of object destruction. This means that in most cases, you cannot call the Cleanup method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Cleanup method from within the Cleanup method of the subclass.
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.
The destination object ( IDLgrBuffer , IDLgrClipboard , IDLgrPrinter , or IDLgrWindow ) to which the specified view object will be drawn.
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.
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.
NOTE: The GetByName function does not perform a recursive search through the object hierarchy. If a fully qualified object name is not specified, only the contents of the current container object are inspected for the named object.
IDLgrModel is described above.
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.
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.
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.
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.
The IDLgrModel:: GetProperty procedure method retrieves the value of a property or group of properties for the model. IDLgrModel is described above.
Any keyword to IDLgrModel::Init
The IDLgrModel:: Init procedure method initializes the model object. IDLgrModel is described above.
NOTE: Init methods are special lifecycle methods , and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Properties retrievable via IDLgrModel::GetProperty
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.
Set this keyword equal to a string containing the name associated with this object. The default is the null string, ' '.
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.
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.
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.
The IDLgrModel:: Remove procedure method removes an atomic graphic object or model object from the model. IDLgrModel is described above.
The IDLgrModel:: Reset procedure method sets the current transform matrix for the model object to the identity matrix. IDLgrModel is described above.
The IDLgrModel:: Rotate procedure method rotates the model about the specified axis by the specified angle. IDLgrModel is described above.
The IDLgrModel:: Scale procedure method scales the model by the specified scaling factors. IDLgrModel is described above.
The IDLgrModel:: SetProperty procedure method sets the value of a property or group of properties for the model. IDLgrModel is described above.
Any keyword to IDLgrModel::Init
The IDLgrModel:: Translate procedure method translates the model by the specified translation offsets. IDLgrModel is described above.