Class ConstObject

3DS Max Plug-In SDK

Class ConstObject

See Also: Class HelperObject, Class INode, Class Object, Class ViewExp, Class Matrix3.

class ConstObject : public HelperObject

Description:

This is a base class used to create construction grid objects. It implements a few of the methods of Animatable and Object and provides a few for working with construction grids.

Methods:

Prototype:

int IsConstObject();

Remarks:

Implemented by the System.

Returns 1 to indicate this object is a construction grid object.

Prototype:

virtual void GetConstructionTM( TimeValue t, INode* inode,

ViewExp *vpt, Matrix3 &tm ) = 0;

Remarks:

Implemented by the Plug-In.

This method returns the construction grid transformation matrix. This is the world space orientation and position of the construction plane.

Parameters:

TimeValue t

The time to retrieve the matrix.

INode* inode

The node in the scene corresponding to the construction grid object.

ViewExp *vpt

The viewport the TM is being returned for. Certain construction grid objects might have a different plane for different viewports.

Matrix3 &tm

The transform matrix for this view is returned here.

Prototype:

virtual Point3 GetSnaps(TimeValue t) = 0;

Remarks:

Implemented by the Plug-In.

This method is specific to construction grids. The system calls this method to retrieve the snap dimension of the grid. In the 3ds max user interface for the construction grid helper object there is a spinner for 'Spacing'. This is the spacing for the grid. When GetSnaps() is called the Point3 returned will have this value in all three axes. This value is used, for example, when you create a box or other primitive and are setting the height dimension.

Note: In release 3.0 and later this method was changed to return a Point3 (not a Point3&).

Parameters:

TimeValue t

The time to retrieve the snap values.