3ds Max C++ API Reference
Loading...
Searching...
No Matches
IIKControl Class Referenceabstract

#include <iiksys.h>

+ Inheritance diagram for IIKControl:

Public Types

typedef IKSys::DofAxis DofAxis
 
typedef IKSys::JointType JointType
 
typedef IKSys::DofSet DofSet
 

Public Member Functions

virtual bool DofActive (DofAxis) const =0
 
virtual DofSet ActiveTrans () const =0
 
virtual DofSet ActiveRot () const =0
 
virtual DofSet ActiveDofs () const =0
 
virtual INodeTab IKChains (JointType) const =0
 
virtual bool DofLowerLimited (DofAxis) const =0
 
virtual bool DofUpperLimited (DofAxis) const =0
 
virtual Point2 DofLimits (DofAxis) const =0
 
virtual Point3 TransLowerLimits () const =0
 
virtual Point3 TransUpperLimits () const =0
 
virtual Point3 RotLowerLimits () const =0
 
virtual Point3 RotUpperLimits () const =0
 
virtual bool IKBound (TimeValue t, JointType jt)=0
 
virtual ControlFKSubController () const =0
 
virtual INodeGetNode () const =0
 
virtual Point3 PrefPosition (TimeValue t, Interval &validityInterval)=0
 
virtual Point3 PrefRotation (TimeValue t, Interval &validityInterval)=0
 
virtual Point3 TransValues (TimeValue, Interval *=0)=0
 
virtual Point3 RotValues (TimeValue, Interval *=0)=0
 
virtual void AssignTrans (const Point3 &, const Interval &)=0
 
virtual void AssignRot (const Point3 &, const Interval &)=0
 
virtual void AssignActiveTrans (const Point3 &, const Interval &)=0
 
virtual void AssignActiveRot (const Point3 &, const Interval &)=0
 
virtual void AssignActiveTrans (const DofSet &, const float[], const Interval &)=0
 
virtual void AssignActiveRot (const DofSet &, const float[], const Interval &)=0
 
virtual void SetTransValid (const Interval &valid)=0
 
virtual void SetRotValid (const Interval &valid)=0
 
virtual void SetTRValid (const Interval &valid)=0
 
virtual void SetPrefTrans (const Point3 &val, TimeValue t=0)=0
 
virtual void SetPrefRot (const Point3 &val, TimeValue t=0)=0
 
virtual void SetPrefTR (const Point3 &trans, const Point3 &rot, TimeValue t=0)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

See also
Class INode, Class Control, Class Point2, Class Point3, Class Interval, Inverse Kinematics

Description:
This class represents the TM controller for IK Chains and is used for nodes that serve as IK joints. This class is closely knit together with the Class IIKChainControl and form the IK system. An interface pointer to the IKControl class can be obtained by using Animatable::GetInterface(I_IKCONTROL). See the Inverse Kinematics section for more detailed information.

Member Typedef Documentation

◆ DofAxis

◆ JointType

◆ DofSet

Member Function Documentation

◆ DofActive()

virtual bool DofActive ( DofAxis  ) const
pure virtual
Remarks
This method allows you to determine which degrees of freedom are active and inactive for the translational and rotational axes.
Parameters:
DofAxis

The DOF axis to check, which is one of the following IKSys::TransX, IKSys::TransY, IKSys::TransZ, IKSys::RotX, IKSys::RotY, IKSys::RotZ.
Returns
TRUE if the specified DOF axis is active, otherwise FALSE.

◆ ActiveTrans()

virtual DofSet ActiveTrans ( ) const
pure virtual
Remarks
This method allows you to determine which degrees of freedom are active and inactive for the translational axes. The returned DofSet can be tested for IKSys::DofX, IKSys::DofX, and IKSys::DofX.
Returns
A DofSet structure containing the translational axes.

◆ ActiveRot()

virtual DofSet ActiveRot ( ) const
pure virtual
Remarks
This method allows you to determine which degrees of freedom are active and inactive for the rotational axes. The returned DofSet can be tested for IKSys::DofX, IKSys::DofX, and IKSys::DofX.
Returns
A DofSet structure containing the translational axes.

◆ ActiveDofs()

virtual DofSet ActiveDofs ( ) const
pure virtual
Remarks
This method allows you to determine which degrees of freedom are active and inactive for the translational and rotational axes. The returned DofSet can be tested for IKSys::TransX, IKSys::TransY, IKSys::TransZ, IKSys::RotX, IKSys::RotY, IKSys::RotZ.
Returns
A DofSet structure containing the translational and rotational axes.

◆ IKChains()

virtual INodeTab IKChains ( JointType  ) const
pure virtual
Remarks
This method returns a list of IK Chain nodes. Note that nn IK chain starts at the rotational joint of the Start Joint and ends at the sliding joint of the End Joint.
Parameters:
JointType

The joint type, either IKSys::SlidingJoint or IKSys::RotationalJoint.
Returns
The node table of IK Chain nodes.

◆ DofLowerLimited()

virtual bool DofLowerLimited ( DofAxis  ) const
pure virtual
Remarks
This method allows you to check if a specific DOF axis has its lower bounds limited.
Parameters:
DofAxis

The DOF axis to check, which is one of the following IKSys::TransX, IKSys::TransY, IKSys::TransZ, IKSys::RotX, IKSys::RotY, IKSys::RotZ.
Returns
TRUE if limited, otherwise FALSE.

◆ DofUpperLimited()

virtual bool DofUpperLimited ( DofAxis  ) const
pure virtual
Remarks
This method allows you to check if a specific DOF axis has its upper bounds limited.
Parameters:
DofAxis

The DOF axis to check, which is one of the following IKSys::TransX, IKSys::TransY, IKSys::TransZ, IKSys::RotX, IKSys::RotY, IKSys::RotZ.
Returns
TRUE if limited, otherwise FALSE.

◆ DofLimits()

virtual Point2 DofLimits ( DofAxis  ) const
pure virtual
Remarks
This method allows you to check if a specific DOF axis has its upper and lower bounds limited.
Parameters:
DofAxis

The DOF axis to check, which is one of the following IKSys::TransX, IKSys::TransY, IKSys::TransZ, IKSys::RotX, IKSys::RotY, IKSys::RotZ.
Returns
A Point2 where X and Y are the lower and upper limits, respectively.

◆ TransLowerLimits()

virtual Point3 TransLowerLimits ( ) const
pure virtual
Remarks
This method allows you to retrieve the translation lower limits.
Returns
A Point3 where X, Y, and Z represents the actual limits.

◆ TransUpperLimits()

virtual Point3 TransUpperLimits ( ) const
pure virtual
Remarks
This method allows you to retrieve the translation upper limits.
Returns
A Point3 where X, Y, and Z represents the actual limits.

◆ RotLowerLimits()

virtual Point3 RotLowerLimits ( ) const
pure virtual
Remarks
This method allows you to retrieve the rotational lower limits.
Returns
A Point3 where X, Y, and Z represents the actual limits.

◆ RotUpperLimits()

virtual Point3 RotUpperLimits ( ) const
pure virtual
Remarks
This method allows you to retrieve the rotational upper limits.
Returns
A Point3 where X, Y, and Z represents the actual limits.

◆ IKBound()

virtual bool IKBound ( TimeValue  t,
JointType  jt 
)
pure virtual
Remarks
The parameter that decides whether an individual degree of freedom is active is not animatable. There is an animatable variable of IK chain that decides whether the goal defined in the IK chain actually affects the joints it covers at a specific time. This method allows you to query that.
Parameters:
TimeValue t

The time at which to test the joint type.

JointType jt

The joint type, either IKSys::SlidingJoint or IKSys::RotationalJoint.
Returns
TRUE if bound, otherwise FALSE.

◆ FKSubController()

virtual Control * FKSubController ( ) const
pure virtual
Remarks
This method allows you to obtain a pointer to the Forward Kinematics sub-controller. Note that the IK controller is not designed to be instanced. It is expected to have a unique node.

◆ GetNode()

virtual INode * GetNode ( ) const
pure virtual
Remarks
This method allows you to obtain a pointer to the node that holds the Forward Kinematics TM controller.

◆ PrefPosition()

virtual Point3 PrefPosition ( TimeValue  t,
Interval validityInterval 
)
pure virtual
Remarks
This method allows you to retrieve the preferred position of translation.
Parameters
t- The time at which to retrieve the preferred position.
validityInterval- The interval into which the validity of the evaluated parameters is intersected.
Returns
The X, Y, and Z, preferred position.

◆ PrefRotation()

virtual Point3 PrefRotation ( TimeValue  t,
Interval validityInterval 
)
pure virtual
Remarks
This method allows you to retrieve the preferred angle of rotation.
Parameters:
Parameters
t- The time at which to retrieve the preferred angle.

validityInterval- The interval into which the validity of the evaluated parameters is intersected.
Returns
The X, Y, and Z, preferred angles.

◆ TransValues()

virtual Point3 TransValues ( TimeValue  ,
Interval = 0 
)
pure virtual

◆ RotValues()

virtual Point3 RotValues ( TimeValue  ,
Interval = 0 
)
pure virtual

◆ AssignTrans()

virtual void AssignTrans ( const Point3 ,
const Interval  
)
pure virtual
Remarks
This method allows you to set the angles of translational joints. Note that this method does not adjust the validity interval.
Parameters:
const Point3&

The joint angles.

const Interval&

The validity interval

◆ AssignRot()

virtual void AssignRot ( const Point3 ,
const Interval  
)
pure virtual
Remarks
This method allows you to set the angles of rotational joints. Note that this method does not adjust the validity interval.
Parameters:
const Point3&

The joint angles.

const Interval&

The validity interval

◆ AssignActiveTrans() [1/2]

virtual void AssignActiveTrans ( const Point3 ,
const Interval  
)
pure virtual
Remarks
This method allows you to set the angles of translational joints. Note that this method will skip those degrees of freedom that are not active and that this method will not adjust the validity interval.
Parameters:
const Point3&

The joint angles.

const Interval&

The validity interval

◆ AssignActiveRot() [1/2]

virtual void AssignActiveRot ( const Point3 ,
const Interval  
)
pure virtual
Remarks
This method allows you to set the angles of rotational joints. Note that this method will skip those degrees of freedom that are not active and that this method does not adjust the validity interval.
Parameters:
const Point3&

The joint angles.

const Interval&

The validity interval

◆ AssignActiveTrans() [2/2]

virtual void AssignActiveTrans ( const DofSet ,
const float  [],
const Interval  
)
pure virtual
Remarks
This method allows you to set the angles of translational joints. The active DOF's are given as the first argument of type DofSet and the new values are supplied as a float array whose size should be the same as the DofSet [DofSet::Count()].Note that this method does not adjust the validity interval.
Parameters:
const DofSet&

The degrees of freedom.

const float[]

The new angles you wish to set.

const Interval&

The validity interval

◆ AssignActiveRot() [2/2]

virtual void AssignActiveRot ( const DofSet ,
const float  [],
const Interval  
)
pure virtual
Remarks
This method allows you to set the angles of rotational joints. The active DOF's are given as the first argument of type DofSet and the new values are supplied as a float array whose size should be the same as the DofSet [DofSet::Count()].Note that this method does not adjust the validity interval.
Parameters:
const DofSet&

The degrees of freedom.

const float[]

The new angles you wish to set.

const Interval&

The validity interval

◆ SetTransValid()

virtual void SetTransValid ( const Interval valid)
pure virtual
Remarks
This method allows you to set the validity interval for translational joint angles.
Parameters:
const Interval& valid

The validity interval.

◆ SetRotValid()

virtual void SetRotValid ( const Interval valid)
pure virtual
Remarks
This method allows you to set the validity interval for rotational joint angles.
Parameters:
const Interval& valid

The validity interval.

◆ SetTRValid()

virtual void SetTRValid ( const Interval valid)
pure virtual
Remarks
This method allows you to set the validity interval for both translational and rotational joint angles.
Parameters:
const Interval& valid

The validity interval.

◆ SetPrefTrans()

virtual void SetPrefTrans ( const Point3 val,
TimeValue  t = 0 
)
pure virtual
Remarks
A solver may start off the solution process with joint angles being set to special values, preferred angles. This method allows you to set the preferred angles of the translational joints.
Parameters:
const Point3& val

The preferred angles you wish to set.

TimeValue t = 0

The time at which to set them.

◆ SetPrefRot()

virtual void SetPrefRot ( const Point3 val,
TimeValue  t = 0 
)
pure virtual
Remarks
A solver may start off the solution process with joint angles being set to special values, preferred angles. This method allows you to set the preferred angles of the rotational joints.
Parameters:
const Point3& val

The preferred angles you wish to set.

TimeValue t = 0

The time at which to set them.

◆ SetPrefTR()

virtual void SetPrefTR ( const Point3 trans,
const Point3 rot,
TimeValue  t = 0 
)
pure virtual
Remarks
A solver may start off the solution process with joint angles being set to special values, preferred angles. This method allows you to set the preferred angles of both the translational and rotational joints.
Parameters:
const Point3& trans

The preferred translational angles you wish to set.

const Point3& rot

The preferred rotational angles you wish to set.

TimeValue t = 0

The time at which to set them.