3ds Max C++ API Reference
|
The ObjectState is the structure that flows up the geometry pipeline. More...
#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. | |
Additional Inherited Members | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void | operator delete (void *ptr) |
Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
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.
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.
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. |
Call this method to clear the specified object state flags.
f | The flags to clear. |
Call this method to test the specified flags.
f | The flags to test. |
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.
|
inline |
Returns the validity interval of the object state's transformation matrix.
|
inline |
Returns the validity interval of the object state's material.
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.
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.
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.
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. |
Object* obj |
Pointer to the object in the pipeline.
The validity interval of the object can be retrieved using obj->ObjectValidity()