Class IKMasterControl

3DS Max Plug-In SDK

Class IKMasterControl

See Also: Class ReferenceTarget, Class IKSlaveControl, Class Control.

class IKMasterControl : public ReferenceTarget

Description:

This class is available in release 2.0 and later only.

The IK Controller requires that you use the Bones system. When you create the bones, a slave IK controller is assigned to each bone. All of the slave IK controllers in a single hierarchy are, in turn, controlled by a master IK controller. This class provides two methods to work with the master controller. To get an interface to this class call GetInterface(I_MASTER); on the controller in question. If the return value is non-NULL you can cast the pointer to an instance of this class.

For an example the use of this class see \MAXSDK\SAMPLES\OBJECTS\BONES.CPP.

Methods:

Prototype:

virtual void AddSlaveNode(INode *node)=0;

Remarks:

Adds the specified node to the list of slave nodes maintained.

Parameters:

INode *node

The node to add.

Prototype:

virtual void *GetMasterBase()=0;

Remarks:

Returns a pointer to the IK master object.

Prototype:

virtual void SetPosThresh(float t)=0;

Remarks:

This method is available in release 3.0 and later only.

Sets the position threshold. If the UI for the master controller is not visible while this method is called, the screen is not redrawn to reflect the changes. After calling this method you should therefore call Interface::RedrawViews().

Parameters:

float t

The value to set.

Prototype:

virtual void SetRotThresh(float t)=0;

Remarks:

This method is available in release 3.0 and later only.

Sets the rotation threshold. If the UI for the master controller is not visible while this method is called, the screen is not redrawn to reflect the changes. After calling this method you should therefore call Interface::RedrawViews().

Parameters:

float t

The value to set.

Prototype:

virtual void SetIterations(int i)=0;

Remarks:

This method is available in release 3.0 and later only.

Sets the iterations value. If the UI for the master controller is not visible while this method is called, the screen is not redrawn to reflect the changes. After calling this method you should therefore call Interface::RedrawViews().

Parameters:

int i

The value to set.

Prototype:

virtual void SetStartTime(TimeValue s)=0;

Remarks:

This method is available in release 3.0 and later only.

Sets the start time. If the UI for the master controller is not visible while this method is called, the screen is not redrawn to reflect the changes. After calling this method you should therefore call Interface::RedrawViews().

Parameters:

TimeValue s

The time to set.

Prototype:

virtual void SetEndTime(TimeValue e)=0;

Remarks:

This method is available in release 3.0 and later only.

Sets the end time. If the UI for the master controller is not visible while this method is called, the screen is not redrawn to reflect the changes. After calling this method you should therefore call Interface::RedrawViews().

Parameters:

TimeValue e

The time to set.

Prototype:

virtual float GetPosThresh()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns the position threshold.

Prototype:

virtual float GetRotThresh()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns the rotation threshold.

Prototype:

virtual int GetIterations()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns the iterations setting.

Prototype:

virtual TimeValue GetStartTime()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns the start time.

Prototype:

virtual TimeValue GetEndTime()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns the end time.

The following function is not part of this class but is available for use:

Function:

IKMasterControl *CreateIKMasterControl();

Remarks:

This global function creates a new IK master controller.