Public Member Functions | Public Attributes

ObjectState Class Reference

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.


Search for all occurrences

Detailed Description

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.

See also:
Object, Matrix3

#include <object.h>

Inheritance diagram for ObjectState:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
os The object state to initialized to os.
CoreExport ~ObjectState ( )

Destructor.

If the tm exists, it is deleted.


Member Function Documentation

void OSSetFlag ( ulong  f ) [inline]

Call this method to update the object state flags.

Parameters:
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.

Parameters:
f The flags to clear.
{ flags &= ~f; }
ulong OSTestFlag ( ulong  f ) const [inline]

Call this method to test the specified flags.

Parameters:
f The flags to test.
Returns:
Nonzero if the specified flags are all set; otherwise 0.
{ 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.

Parameters:
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).

Parameters:
t Specifies the time to retrieve the validity interval.
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.

If the specified matrix is NULL, a new Matrix3 is allocated and is initialized to the identity matrix.

Parameters:
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.

CoreExport void ApplyTM ( Matrix3 mat,
Interval  iv 
)

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
checkLock If checkLock is TRUE, the object the object state points to is not deleted if it is locked; otherwise it is always deleted.
Operators:

Member Data Documentation

Pointer to the object in the pipeline.

The validity interval of the object can be retrieved using obj->ObjectValidity()


ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState
ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState ObjectState