This reference page is linked to from the following overview topics: Pipeline Overview, Object State, Object State Transformation Matrix, Viewport Rendering and the Pipeline, Cache System, World Space Modifiers and Object Transformations, Channels, Whole Object Modifiers, Extracting the Mesh from a Node.
The ObjectState is the structure that flows up the geometry pipeline.
It contains a matrix, a material index, some flags for channels, and a pointer to the object in the pipeline. This is what is passed down the pipeline, and ultimately used by the Node to Display, Hittest, render.
#include <object.h>
Public Member Functions |
|
CoreExport | ObjectState () |
Constructor. |
|
CoreExport | ObjectState (Object *ob) |
Constructor. |
|
CoreExport | ObjectState (const ObjectState &os) |
Constructor. |
|
CoreExport | ~ObjectState () |
Destructor. |
|
void | OSSetFlag (ulong f) |
Call this method to update the object state
flags. |
|
void | OSClearFlag (ulong f) |
Call this method to clear the specified
object state flags. |
|
ulong | OSTestFlag (ulong f) const |
Call this method to test the specified
flags. |
|
CoreExport void | OSCopyFlag (ulong f, const ObjectState &fromos) |
Copies the specified flag settings from the
specified object state to this object state. |
|
CoreExport ObjectState & | operator= (const ObjectState &os) |
Assignment operator. |
|
Interval | tmValid () const |
Returns the validity interval of the object
state's transformation matrix. |
|
Interval | mtlValid () const |
Returns the validity interval of the object
state's material. |
|
CoreExport Interval | Validity (TimeValue t) const |
Returns the validity interval of the object
state. |
|
CoreExport int | TMIsIdentity () const |
Returns nonzero if the object state's
transformation matrix is the identity matrix; otherwise zero.
|
|
CoreExport void | SetTM (Matrix3 *mat, Interval iv) |
Sets the object state's transformation
matrix to the specified Matrix3 and its validity interval to the
interval passed. |
|
CoreExport Matrix3 * | GetTM () const |
Returns the object state's transformation
matrix. |
|
CoreExport void | SetIdentityTM () |
Sets the object state tm to the identity
transformation matrix. |
|
CoreExport void | ApplyTM (Matrix3 *mat, Interval iv) |
Applies the specified matrix to the object
state tm. |
|
CoreExport void | CopyTM (const ObjectState &fromos) |
Copies the object state tm (and its validity
interval) from the specified object state's tm. |
|
CoreExport void | CopyMtl (const ObjectState &fromos) |
Copies the object state material (and its
validity interval) from the specified object state's material.
|
|
CoreExport void | Invalidate (ChannelMask channels, BOOL checkLock=FALSE) |
Invalidates the specified channels of the
object state's object. |
|
CoreExport ChannelMask | DeleteObj (BOOL checkLock=FALSE) |
Deletes the object state's object. |
|
Public Attributes |
|
Object * | obj |
Pointer to the object in the pipeline.
|
CoreExport ObjectState | ( | ) |
Constructor.
The object pointer is initialized to NULL.
CoreExport ObjectState | ( | Object * | ob | ) |
Constructor.
The object pointer is set to the object passed. The tm pointer is set to NULL and the tm and mtl validity intervals are set to FOREVER.
ob | The object to initialize the object pointer to. |
CoreExport ObjectState | ( | const ObjectState & | os | ) |
Constructor.
The object state is initialized to the object state passed.
os | The object state to initialized to os. |
CoreExport ~ObjectState | ( | ) |
Destructor.
If the tm exists, it is deleted.
void OSSetFlag | ( | ulong | f | ) | [inline] |
Call this method to update the object state flags.
f | The flags to set. The specified flags are ORed into the current state of the flags. |
{ flags |= f; }
void OSClearFlag | ( | ulong | f | ) | [inline] |
Call this method to clear the specified object state flags.
f | The flags to clear. |
{ flags &= ~f; }
ulong OSTestFlag | ( | ulong | f | ) | const [inline] |
Call this method to test the specified flags.
f | The flags to test. |
{ return flags&f; }
CoreExport void OSCopyFlag | ( | ulong | f, |
const ObjectState & | fromos | ||
) |
Copies the specified flag settings from the specified object state to this object state.
f | The flags to copy. |
fromos | The source object state. |
CoreExport ObjectState& operator= | ( | const ObjectState & | os | ) |
Assignment operator.
The object pointer, flags, transformation matrix (and its validity interval), and material (and its validity interval) are copied from the specified object state.
Interval tmValid | ( | ) | const [inline] |
Returns the validity interval of the object state's transformation matrix.
{ return tmvi; }
Interval mtlValid | ( | ) | const [inline] |
Returns the validity interval of the object state's material.
{ return mtlvi; }
CoreExport Interval Validity | ( | TimeValue | t | ) | const |
Returns the validity interval of the object state.
If the object is not defined, this interval is NEVER. Otherwise it is the intersection of the tm validity interval, the mtl validity interval and the interval returned from obj->ObjectValidity(t).
t | Specifies the time to retrieve the validity interval. |
CoreExport int TMIsIdentity | ( | ) | const |
Returns nonzero if the object state's transformation matrix is the identity matrix; otherwise zero.
Sets the object state's transformation matrix to the specified Matrix3 and its validity interval to the interval passed.
If the specified matrix is NULL, a new Matrix3 is allocated and is initialized to the identity matrix.
mat | Specifies the matrix to set. |
iv | Specifies the validity interval to set. |
CoreExport Matrix3* GetTM | ( | ) | const |
Returns the object state's transformation matrix.
CoreExport void SetIdentityTM | ( | ) |
Sets the object state tm to the identity transformation matrix.
Applies the specified matrix to the object state tm.
The object state tm is multiplied by the specified matrix. The specified interval is intersected with the object state tm validity interval.
mat | The matrix to apply. |
iv | The interval to intersect with the object state's tm validity interval. |
CoreExport void CopyTM | ( | const ObjectState & | fromos | ) |
Copies the object state tm (and its validity interval) from the specified object state's tm.
fromos | The object state whose tm is to be copied. |
CoreExport void CopyMtl | ( | const ObjectState & | fromos | ) |
Copies the object state material (and its validity interval) from the specified object state's material.
fromos | The object state whose material is to be copied. |
CoreExport void Invalidate | ( | ChannelMask | channels, |
BOOL | checkLock =
FALSE |
||
) |
Invalidates the specified channels of the object state's object.
channels | The channels of the object to invalidate. |
checkLock | If checkLock is TRUE and OBJ_CHANNELS is one of the specified channels, the object the object state points to is not deleted if it is locked; otherwise it is deleted. |
CoreExport ChannelMask DeleteObj | ( | BOOL | checkLock = FALSE |
) |
Deletes the object state's object.
checkLock | If checkLock is TRUE, the object the object state points to is not deleted if it is locked; otherwise it is always deleted. |
Pointer to the object in the pipeline.
The validity interval of the object can be retrieved using obj->ObjectValidity()