Public Types | Public Member Functions

IIKChainControl Class Reference

This reference page is linked to from the following overview topics: IK Concepts, IIKChainControl.


Search for all occurrences

Detailed Description

See also:
: Class IKCmdOps, Class IKChainActions

Description:
This class is only available in release 5 or later.

The interface class to TM controller that the IK chain node employs. Suppose node is an IK chain node, following code obtains the interface pointer:

IIKChainControl* ikchain = (IIKChainControl*) node->GetTMController()->GetInterface(I_IKChainControl);
From this pointer, we can get all properties pertinent to an IK Chain.

#include <iiksys.h>

Inheritance diagram for IIKChainControl:
Inheritance graph
[legend]

List of all members.

Public Types

enum   {
  kPBlockRef = 0, kGoalTMRef, kEndJointRef, kEnableRef,
  kStartJointRef, kOwningNodeRef, kLastRef
}
enum   { kParamBlock, kNumParamBlocks }
enum   {
  kStartJoint, kEndJoint, kSolverName, kAutoEnable,
  kSwivel, kPosThresh, kRotThresh, kIteration,
  kEEDisplay, kEESize, kGoalDisplay, kGoalSize,
  kVHDisplay, kVHSize, kVHLength, kSolverDisplay,
  kAutoSnap, kVHUseTarget, kVHTarget, kSAParent,
  kLastHIIKParam
}
enum   SplineIKParams {
  kPickShape = kLastHIIKParam, kTwistHStartDisplay, kTwistHEndDisplay, kTwistHStartSize,
  kTwistHEndSize, kTwistHStartLength, kTwistHEndLength, kTwistHStartAngle,
  kTwistHEndAngle, kAutoSplineCreate, kSplineTypeChoice, kSplineKnotCount,
  kCreateHelper, kLinktoRootNode, kHelpersize, kHelperCentermarker,
  kHelperAxisTripod, kHelperCross, kHelperBox, kHelperScreensize,
  kHelperDrawontop, kUpnode, kUseUpnode, kLastSplineIKParam
}
enum   SAParentSpace { kSAInGoal, kSAInStartJoint }

Public Member Functions

virtual float  TwistHStartAngle (TimeValue, Interval &)=0
virtual float  TwistHEndAngle (TimeValue, Interval &)=0
virtual INode StartJoint () const =0
virtual INode EndJoint () const =0
virtual INode GetNode () const =0
virtual Point3  ChainNormal (TimeValue t, Interval &valid)=0
virtual Point3  InitPlane (TimeValue t)=0
virtual Point3  InitEEAxis (TimeValue t)=0
virtual float  InitChainLength (TimeValue t)=0
virtual float  SwivelAngle (TimeValue, Interval &)=0
  The swivel angle at time.
virtual const IKSys::ZeroPlaneMap DefaultZeroPlaneMap (TimeValue t)=0
  The zero plane is the plane that, at each "start joint to end joint" axis, is used as a reference plane with regard to that the swivel angle is defined.
virtual SAParentSpace  SwivelAngleParent () const =0
  Whether the zero plane is defined in the parent space of the start joint, kSAInStartJoint, or in the space of the IK goal, kSAInGoal.
virtual IKSolver Solver () const =0
  The solver that is assigned to this chain.
virtual bool  SolverEnabled (TimeValue, Interval *=0)=0
  Whether the solver is enabled (IK mode) or not (FK mode).
virtual bool  CanAutoEnable () const =0
  When the chain is in the FK mode, IK can still be invoked when the goal is moved interactively if CanAutoEnabled() is true.
virtual bool  AutoEnableSet () const =0
  It is a transient state that is alive only at the time when joint angles are to be updated.
virtual bool  Valid () const =0
  Whether this chain is a valid one.
virtual Interface_ID  GoalInterfaceID () const =0
  What IK goal interface this chain is prepaired for.
virtual BaseInterface AcquireGoal (TimeValue, Interval &, const Matrix3 &parent_of_start_joint)=0
  It returns an interface to the goal at the time.

Member Enumeration Documentation

anonymous enum
Enumerator:
kPBlockRef 
kGoalTMRef 
kEndJointRef 
kEnableRef 
kStartJointRef 
kOwningNodeRef 
kLastRef 
       {
    kPBlockRef = 0, // ParamBlock
    kGoalTMRef,     // Matrix3 controller
    kEndJointRef,   // INode
    kEnableRef,     // Bool (float) controller
    kStartJointRef, // INode
    kOwningNodeRef, // Reference on a NodeMonitor that holds an indirect reference on the owning Node
    kLastRef
  };
anonymous enum
anonymous enum
Enumerator:
kStartJoint 
kEndJoint 
kSolverName 
kAutoEnable 
kSwivel 
kPosThresh 
kRotThresh 
kIteration 
kEEDisplay 
kEESize 
kGoalDisplay 
kGoalSize 
kVHDisplay 
kVHSize 
kVHLength 
kSolverDisplay 
kAutoSnap 
kVHUseTarget 
kVHTarget 
kSAParent 
kLastHIIKParam 
       {
    kStartJoint,    // INode, referenced by kStartJointRef
    kEndJoint,      // INode, referenced by kEndJointRef
    kSolverName,    // String
    kAutoEnable,    // BOOL
    kSwivel,        // Angle
    kPosThresh,     // Float
    kRotThresh,     // Float
    kIteration,     // Integer
    kEEDisplay,     // BOOL
    kEESize,        // Float
    kGoalDisplay,   // BOOL
    kGoalSize,      // Float
    kVHDisplay,     // BOOL
    kVHSize,        // Float
    kVHLength,      // Float
    kSolverDisplay, // BOOL
    kAutoSnap,      // BOOL
    kVHUseTarget,   // BOOL
    kVHTarget,      // INode
    kSAParent,      // RadioBtn_Index
    kLastHIIKParam
  };

Member Function Documentation

virtual float TwistHStartAngle ( TimeValue  ,
Interval  
) [pure virtual]
virtual float TwistHEndAngle ( TimeValue  ,
Interval  
) [pure virtual]
virtual INode* StartJoint ( ) const [pure virtual]
Remarks:
The start joint, end joint of the chain, and the node to that this IK chain controller belongs.

virtual INode* EndJoint ( ) const [pure virtual]
Remarks:
Please refer to StartJoint().

virtual INode* GetNode ( ) const [pure virtual]
Remarks:
Please refer to StartJoint().

virtual Point3 ChainNormal ( TimeValue  t,
Interval valid 
) [pure virtual]
Remarks:
Preferred angles are used to start the IK iteration. Hence, the pose when joint angles assume the preferred angles is also called the Initial Pose in the context of IK. It is animatable, meaning that at different time, IK may start iteration from different poses.

Let's call the plane that the joints of an IK chain the (IK) solver plane. InitPlane() and InitEEAxis() returns the normal to the solver plane and the axis from the start joint to the end joint (end-effector axis) at the initial (preferred angle) pose, at time of input argument. They are represented in the parent space of the start joint. ChainNormal() returns the normal in the object space, as

InitPlane() == ChainNormal() * startIKCont->PrefRotation()

where

startIKCont = (IIKControl*)StartJoint()->GetController()->GetInterface(I_IKControl);

Furthermore, ChainNormal() takes as an input argument a validity interval that will be intersected by the validity interval of the chain normal.

virtual Point3 InitPlane ( TimeValue  t ) [pure virtual]
Remarks:
Please refer to ChainNormal().
virtual Point3 InitEEAxis ( TimeValue  t ) [pure virtual]
Remarks:
Please refer to ChainNormal().
virtual float InitChainLength ( TimeValue  t ) [pure virtual]
Remarks:
Please refer to ChainNormal().
virtual float SwivelAngle ( TimeValue  ,
Interval  
) [pure virtual]

The swivel angle at time.

The validity interval, valid, will be intersected.

virtual const IKSys::ZeroPlaneMap* DefaultZeroPlaneMap ( TimeValue  t ) [pure virtual]

The zero plane is the plane that, at each "start joint to end joint" axis, is used as a reference plane with regard to that the swivel angle is defined.

The zero plane map maps an axis to a plane normal. The IK system offers as a possible default via DefaultZeroPlaneMap().

virtual SAParentSpace SwivelAngleParent ( ) const [pure virtual]

Whether the zero plane is defined in the parent space of the start joint, kSAInStartJoint, or in the space of the IK goal, kSAInGoal.



virtual IKSolver* Solver ( ) const [pure virtual]

The solver that is assigned to this chain.



virtual bool SolverEnabled ( TimeValue  ,
Interval = 0 
) [pure virtual]

Whether the solver is enabled (IK mode) or not (FK mode).



virtual bool CanAutoEnable ( ) const [pure virtual]

When the chain is in the FK mode, IK can still be invoked when the goal is moved interactively if CanAutoEnabled() is true.

It is a PB2 parameter of index kAutoEnable. It is not animatable.

virtual bool AutoEnableSet ( ) const [pure virtual]

It is a transient state that is alive only at the time when joint angles are to be updated.

Being true means that the Enabled state of the chain is off the IK is turned on by interactive manipulation.

virtual bool Valid ( ) const [pure virtual]

Whether this chain is a valid one.

It is valid if it is assigned a proper IK solver and it has valid start joint and end joint.

virtual Interface_ID GoalInterfaceID ( ) const [pure virtual]

What IK goal interface this chain is prepaired for.

For now, there are two interfaces: HI IK goal (IHIIKGoal) and Spline IK goal (ISplineIKGoal). An IK chain will admit of plugin solvers that support this goal interface (IKSolver::ExpectGoal()).

virtual BaseInterface* AcquireGoal ( TimeValue  ,
Interval ,
const Matrix3 parent_of_start_joint 
) [pure virtual]

It returns an interface to the goal at the time.

Validity interval is reconciled. The parent matrix of the start joint is also returned in the third argument.


IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl
IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl IIKChainControl