LinkChain Class Reference

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



Detailed Description

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

This class abstracts the data structure that the IK system pass to the plugin solver. With it, an IK problem becomes a pure mathematical one to the plugin solver.

A LinkChain starts with a rootLink, followed by a number of 1D link. The rootLink has a whole rotation (c.f. class RootLink in ikHierarch.h), as represented by Euler angles of order XYZ, rotXYZ. These angles may be marked as active or not. The RootLink exposes the whole rotation to allow the solver to handle the start joint specially.

The next 1D link is to be pivoted and aligned at the reference frame that is offset from the rotation of the RootLink by "rigidExtend".

#include <ikhierarchy.h>

Inheritance diagram for LinkChain:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  LinkChain ()
CoreExport  LinkChain (unsigned lc)
virtual CoreExport  ~LinkChain ()
virtual void *  GetInterface (ULONG i) const
const Link LinkOf (unsigned i) const
Link LinkOf (unsigned i)
unsigned  LinkCount () const
CoreExport int  PreBone (unsigned i) const
CoreExport unsigned  Bone (unsigned i) const
BaseInterface GetIKGoal ()
void  SetIKGoal (BaseInterface *ikgoal)
CoreExport void  ReleaseIKGoal ()

Public Attributes

Matrix3  parentMatrix
RootLink  rootLink

Protected Member Functions

CoreExport void  SetLinkCount (unsigned lc)

Constructor & Destructor Documentation

LinkChain ( ) [inline]
:links(0),linkCount(0) {}
CoreExport LinkChain ( unsigned  lc )
virtual CoreExport ~LinkChain ( ) [virtual]

Member Function Documentation

virtual void* GetInterface ( ULONG  i ) const [inline, virtual]
{ UNUSED_PARAM(i); return NULL; }
const Link& LinkOf ( unsigned  i ) const [inline]
Remarks:
The i-th 1D link. The next link is pivoted and aligned at

LinkOf(i).LinkMatrix(true) * LinkOf(i-1).LinkMatrix(true) ... * LinkOf(0).LinkMatrix(true) * rootLink.LinkMatrix(true)

This is the extremity after the i-th link. The position of the end effector, in particular, is the extremity of the last link.
{return links[i];}
Link& LinkOf ( unsigned  i ) [inline]
Remarks:
Please refer to the above entry for full explanation.

{return links[i];}
unsigned LinkCount ( ) const [inline]
Remarks:
The number of 1D links following the rootLink.

{ return linkCount; }
CoreExport int PreBone ( unsigned  i ) const
Remarks:
A 1D link comprises a degree of freedom, which can be rotational or prismatic (sliding), and an offset transfromation, "rigidExtend". If the length of "rigidExtend" is zero, the next 1D link comes from same joint of this link. PreBone(i) returns the first link that precedes the i-th link that has non-zero "rigidExtend." In other words, LinkOf(PreBone(i) + 1) starts a new joint that includes i-th link as one of its degrees of freedom. PreBone(i) is always less then i.

CoreExport unsigned Bone ( unsigned  i ) const
Remarks:
Bone(i) returns the first index, j, such that j >= i and LinkOf(j).ZeroLength() false. This is the last link of the bone that includes i-th link as a degree of freedom.

BaseInterface* GetIKGoal ( ) [inline]
Remarks:
Returns an interface pointer to the goal. The actual type of goal can be queried from the interface. (They are documented separately.)

{ return ikGoal; }
void SetIKGoal ( BaseInterface ikgoal ) [inline]
Remarks:
They are used to set and release the goal. The plugin solver should not worried about it. The IK system will use them to the set and release the goal.

{ ikGoal = ikgoal; }
CoreExport void ReleaseIKGoal ( )
Remarks:
Please refer to SetIKGoal() for full explanation.
CoreExport void SetLinkCount ( unsigned  lc ) [protected]

Member Data Documentation

Remarks:
This LinkChain is originally cut off from a transformation space quantified by this matrix. Specifically, it is the matrix that accumulates all transformations from the root of the world to the position component of the start joint.


LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain
LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain LinkChain