Public Member Functions

IKSlaveControl Class Reference

Search for all occurrences

Detailed Description

See also:
Class Control, Class IKMasterControl, Class Point3, Class Quat.

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 access to the slave controller parameters.

If you have a pointer to a TM controller you may test the Class_ID against IKSLAVE_CLASSID to determine if it is an IK Slave Controller.

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

#include <ikctrl.h>

Inheritance diagram for IKSlaveControl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Class_ID  ClassID ()
  Retrieves a constant that uniquely identifies the plugin class.
SClass_ID  SuperClassID ()
  Retrieves a constant representing the type of the plugin.
virtual IKMasterControl GetMaster ()=0
virtual void  SetDOF (int which, BOOL onOff)=0
virtual void  SetInitPos (Point3 pos)=0
virtual void  SetInitRot (Point3 rot)=0
virtual void  MakeEE (BOOL onOff, DWORD which, Point3 pos, Quat rot)=0

Member Function Documentation

Class_ID ClassID ( ) [inline, virtual]

Retrieves a constant that uniquely identifies the plugin class.

This method must return the unique ID for the plugin class. If two ClassIDs conflict, the system will only load the first conflicting one it finds. A program (gencid.exe) is provided to generate unique class id values.

Returns:
A class id that uniquely identifies a plugin class
See also:
Class ClassID, List of Class IDs.

Reimplemented from Animatable.

{return IKSLAVE_CLASSID;}
SClass_ID SuperClassID ( ) [inline, virtual]

Retrieves a constant representing the type of the plugin.

Returns:
A super class id that uniquely identifies the type (category) of the plugin. Note that several plugin classes can be of the same type, thus return the same super class id. Plugins are uniquely identified by their class ids. List of Super Class IDs.
See also:
SClass_ID

Reimplemented from ReferenceTarget.

virtual IKMasterControl* GetMaster ( ) [pure virtual]
Remarks:
Returns a pointer to the IKMasterControl that manages this IK slave controller.
virtual void SetDOF ( int  which,
BOOL  onOff 
) [pure virtual]
Remarks:
Sets the specified degree of freedom to on or off.
Parameters:
int which

Specifies which degree of freedom to modify. Pass a value between 1 and 6. The first 3 DOFs are position and the next 3 are rotation.

BOOL onOff

TRUE for on; FALSE for off.
virtual void SetInitPos ( Point3  pos ) [pure virtual]
Remarks:
Sets the initial position to the value passed.
Parameters:
Point3 pos

The initial position to set.
virtual void SetInitRot ( Point3  rot ) [pure virtual]
Remarks:
Sets the initial rotation to the value passed.
Parameters:
Point3 rot

The initial rotation to set.
virtual void MakeEE ( BOOL  onOff,
DWORD  which,
Point3  pos,
Quat  rot 
) [pure virtual]
Remarks:
For any IK solution you explicitly move one object. 3ds Max uses IK calculations to move and rotate all other objects in the kinematic chain to react to the object you moved. The object that you move is the end effector. There are two types of end effectors; Position and Rotation. This method create or deletes an end effector for position or rotation or both.
Parameters:
BOOL onOff

Controls if the end effector is on or off (creates or deletes the end effector controller). TRUE to create; FALSE to delete.

DWORD which

Specifies which end effector(s) to modify. Set the low order bit for position, the second bit for rotation, or set both for position and rotation.

Point3 pos

The initial position set at time 0 for the position controller (CTRL_ABSOLUTE).

Quat rot

The initial rotation set at time 0 for the rotation controller (CTRL_ABSOLUTE).

IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl
IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl IKSlaveControl