Class WSMObject

3DS Max Plug-In SDK

Class WSMObject

See Also: Class Object, Class SimpleWSMObject, Class ForceField, Class CollisionObject.

class WSMObject : public Object

Description:

This class is a base class used to derived the helper object for a space warp modifier (WSM Modifier).

World Space Object plug-ins use a Super Class ID of WSM_OBJECT_CLASS_ID.

Methods:

Prototype:

SClass_ID SuperClassID()

Remarks:

Implemented by the System.

Returns the super class ID of this plug-in type: WSM_OBJECT_CLASS_ID.

Prototype:

virtual Modifier *CreateWSMMod(INode *node)=0;

Remarks:

Implemented by the Plug-In.

When the user binds a node to a space warp, a new modifier must be created and added to the node's WSM derived object. This method creates the new modifier.

Parameters:

INode *node

The node of the WSMObject.

Return Value:

A pointer to the new modifier.

Prototype:

virtual int UsesWireColor();

Remarks:

This method is available in release 2.0 and later only.

This is a method of Object. Below is shown the default implementation provided by this class.

Default Implementation:

{ return FALSE; }

Prototype:

virtual BOOL NormalAlignVector(TimeValue t,Point3 &pt, Point3 &norm);

Remarks:

This method is available in release 2.0 and later only.

This is a method of Object. Below is shown the default implementation provided by this class.

Default Implementation:

{pt=Point3(0,0,0);norm=Point3(0,0,-1);return TRUE;}

Prototype:

virtual BOOL SupportsDynamics();

Remarks:

This method is available in release 2.0 and later only.

Returns TRUE if spacewarp or collision object supports Dynamics; otherwise FALSE.

Default Implementation:

{ return FALSE; }

Prototype:

virtual ForceField *GetForceField(INode *node);

Remarks:

This method is available in release 2.0 and later only.

Returns a pointer to a ForceField. This pointer can be used during dynamics calculations, but should not be hung on to after that. For example, you shouldn't have the pointer long enough for it to be possible for the user to delete the space warp object. When you're done using the ForceField call its DeleteThis() method. This method may be called several times on the same space warp object with different INode* if it is instanced.

Parameters:

INode *node

This is the space warp object's node.

Default Implementation:

{return NULL;}

Prototype:

virtual CollisionObject *GetCollisionObject(INode *node);

Remarks:

This method is available in release 4.0 and later only.

This method returns the collision object for the WSM. This works just like GetForceField() documented above.

Parameters:

INode *node

This is the space warp object's node.

Default Implementation:

{return NULL;}