IK System Interfaces
 
 
 

The IK system services two interfaces, one through the CORE, and the other through the IK Chain Controller class.

IKCmdOps

The interface ID is defined in IIKSys.h as IK_FP_INTERFACE_ID and is published through the CORE, i.e., to get a pointer to this interface, call GetCOREInterface(IK_FP_INTERFACE_ID).

To create a new IK chain, use the method CreateIKChain(). Given two pointers, start and end, that are intended for the Start and End joints respectively, and the solver's name, solver, this method will create a node that has an IKChainControl as the TM controller. This method will return false and fail if: 1) start joint is not a proper ancestor of end joint in the scene graph; or 2) there is a node along the path from the start joint to the end joint whose TM controller is not an IK Control and is not replaceable, or 3) no IK solver is found with the given name.

IKChainActions

The interface ID is defined in IIKsys.h as IKCHAIN_FP_INTERFACE_ID and is published through the class IKChainControl, i.e., to get a pointer to this interface, call;

GET_IKCHAIN_CD->GetInterface(IKCHAIN_FP_INTERFACE_ID)

where GET_IKCHAIN_CD is a macro defined in the same file that produces a pointer to the class descriptor of class IKChainControl.

This interface also publishes a number of actions. An action acts on the currently selected IK chain node. The following method returns TRUE if there is exactly one valid IK chain node selected: IsSnapEnabled(). The following methods execute snapping on the currently selected IK chain node: SnapAction() , IKSnapAction(), and FKSnapAction(). The first one does IK snapping if its Enabled is false and FK snapping if its Enabled is true. The next two will do IK snapping and FK snapping, respectively.