Atoms Crowd  4.1.0
AtomsCore::JointChain Class Reference

JointChain class. More...

#include <JointChain.h>

Classes

struct  BindData
 

Public Member Functions

 JointChain (unsigned short numberOfJoints)
 Constructor.
 
 JointChain (const JointChain &rhs)
 Copy constructor.
 
 ~JointChain ()
 Destructor.
 
JointChainoperator= (const JointChain &ptr)
 Assign operator.
 
const std::string & name () const
 Gets the jointChain name. More...
 
void setName (const std::string &name)
 Sets the jointChain name. More...
 
const std::string & fullName () const
 Gets the jointChain full name. More...
 
void setFullName (const std::string &fullName)
 Sets the jointChain full name. More...
 
unsigned short id () const
 Gets the jointChain id. More...
 
void setId (unsigned short id)
 Sets the jointChain id. More...
 
Jointjoint (unsigned short i)
 Gets a joint. More...
 
const Jointjoint (unsigned short i) const
 Gets a joint. More...
 
unsigned short jointId (unsigned short i) const
 Gets the id in skeleton of the joint at index i. More...
 
const std::vector< unsigned short > & ikJointIds () const
 Gets the vector of joint ids in skeleton which are available for IK solvers.
 
const std::vector< unsigned short > & skeletalJointIds () const
 Gets the vector of joint ids in skeleton between start and end (both included)
 
const BindDatabindData (unsigned short i) const
 Gets the bind data of the joint at index i. More...
 
void setJoint (const Joint &joint, unsigned short i)
 Sets the joint at index i. More...
 
void setJointId (unsigned short id, unsigned short i)
 Sets the joint at index i. More...
 
void setIkJointIds (std::vector< unsigned short > ikIds)
 Sets the joint ids vector. More...
 
unsigned short numJoints () const
 Gets the number of joints. More...
 
unsigned short numIkJoints () const
 Gets the number of joints available for IK solvers. More...
 
unsigned short numSkeletalJointIds () const
 Gets the number of joints in the skeleton between start and end (both included) More...
 
const std::vector< unsigned short > & jointIds () const
 Gets the joint ids in skeleton. More...
 
const JointChainparent () const
 Gets the parent joint chain. More...
 
void setParent (JointChain &parent)
 Refresh pointer to the parent joint chain.
 
const JointPtr start () const
 Gets the start joint. More...
 
void setStart ()
 Refresh pointer to the start joint.
 
const JointPtr end () const
 Gets the end joint. More...
 
void setEnd ()
 Refresh pointer to the end joint.
 
bool isConnectedToParent () const
 Gets if this chain is directly connected to parent joint chain.
 
void setIsConnectedToParent (bool isConnected)
 Sets if this chain is directly connected to parent joint chain. More...
 
bool isRoot () const
 Gets if this chain is root.
 
void setIsRoot (bool isRoot)
 Sets if this chain is root. More...
 
bool isSpine () const
 Gets if this chain is a spine.
 
void setIsSpine (bool isSpine)
 Sets if this chain is spine. More...
 
bool isLimb () const
 Gets if this chain is a limb.
 
void setIsLimb (bool isLimb)
 Sets if this chain is limb. More...
 
bool isEffector () const
 Gets if this chain is a effector.
 
void setIsEffector (bool isEffector)
 Sets if this chain is effector. More...
 
bool isCenter () const
 Gets if this chain is centered.
 
void setIsCenter (bool isCenter)
 Sets if this chain is centered. More...
 
bool forceUseFabrik () const
 Gets if this chain computes forced fabrik.
 
void setForceUseFabrik (bool useFabrik)
 Sets if this chain computes forced fabrik. More...
 
bool forceOrientEnd () const
 Gets if this chain orients the end joint after IK solver.
 
void setForceOrientEnd (bool orientEnd)
 Sets if this chain orients the end joint after IK solver. More...
 
bool hasFootTip () const
 Gets if this chain contains foot tip.
 
void setHasFootIk (bool hasFootIk)
 Sets if this chain contains foot tip. More...
 
bool hasFootIk () const
 Gets if this chain contains foot ik.
 
void setHasFootTip (bool hasFoot)
 Sets if this chain contains foot ik. More...
 
bool hasPelvis () const
 Gets if this chain contains pelvis.
 
void setHasPelvis (bool hasPelvis)
 Sets if this chain contains pelvis. More...
 
bool hasPoleVector () const
 Gets if this chain has pole vector.
 
void setHasPoleVector (bool hasPoleVector)
 Sets if this chain has pole vector. More...
 
AtomsCore::Vector3 poleVector () const
 Gets this chain pole vector.
 
void setPoleVector (AtomsCore::Vector3 poleVector)
 Sets this chain pole vector. More...
 
unsigned short footTip () const
 Gets the footTip.
 
void setFootTip (unsigned short footTip)
 Sets the footTip. More...
 
unsigned short footIk () const
 Gets the foot ik.
 
void setFootIk (unsigned short footIk)
 Sets the foot ik. More...
 
unsigned short pelvisId () const
 Gets the pelvis id.
 
void setPelvisId (unsigned short pelvisId)
 Sets the pelvis id. More...
 
void computeWorldBindData (const AtomsCore::Skeleton &skeleton, const AtomsCore::Poser &poser)
 Computes the world bind data of every joint in chain.
 
double length () const
 Gets length of the chain.
 
void setLength (double len)
 Set length of the chain.
 
void computeLength ()
 Computes the length of the chain.
 
AtomsCore::Vector3 start2endBindVector () const
 Gets distance vector from start to end in bind pose.
 
double start2endBindDistance () const
 Gets distance from start to end in bind pose.
 
void getWorldBindData (const AtomsCore::Poser &poser, const unsigned int jointId, AtomsCore::Matrix &matrix, AtomsCore::Vector3 &scale, AtomsCore::Vector3 &shear, AtomsCore::Euler &euler, AtomsCore::Vector3 &pos) const
 Extracts the world bind data of the given joint.
 
void computeSkeletalJointIds (const AtomsCore::Skeleton &skeleton)
 Sets the skeletal joint ids vector navigating on the skeleton.
 
void setParentSpine (unsigned short spineJointId, const AtomsCore::Vector3 &planeNormal, double baseSize)
 Set parent spine information.
 
const AtomsCore::Vector3spinePlaneNormal () const
 Get spine plane normal.
 
const unsigned int spineJointId () const
 Get spine joint id.
 
const double spineBaseSize () const
 Get spine joint id.
 

Detailed Description

JointChain class.

Member Function Documentation

◆ bindData()

const JointChain::BindData & AtomsCore::JointChain::bindData ( unsigned short  i) const
inline

Gets the bind data of the joint at index i.

Parameters
iindex in chain

◆ end()

const JointPtr AtomsCore::JointChain::end ( ) const
inline

Gets the end joint.

Returns
end Joint

◆ fullName()

const std::string & AtomsCore::JointChain::fullName ( ) const
inline

Gets the jointChain full name.

Returns
JointChain full name

◆ id()

unsigned short AtomsCore::JointChain::id ( ) const
inline

Gets the jointChain id.

Returns
JointChain id

◆ joint() [1/2]

Joint& AtomsCore::JointChain::joint ( unsigned short  i)

Gets a joint.

Parameters
iJoint index in chain
Returns
Joint at index i

◆ joint() [2/2]

const Joint& AtomsCore::JointChain::joint ( unsigned short  i) const

Gets a joint.

Parameters
iJoint index in chain
Returns
Joint at index i

◆ jointId()

unsigned short AtomsCore::JointChain::jointId ( unsigned short  i) const
inline

Gets the id in skeleton of the joint at index i.

Parameters
iindex in chain

◆ jointIds()

const std::vector< unsigned short > & AtomsCore::JointChain::jointIds ( ) const
inline

Gets the joint ids in skeleton.

Returns
joint ids in skeleton

◆ name()

const std::string & AtomsCore::JointChain::name ( ) const
inline

Gets the jointChain name.

Returns
JointChain name

◆ numIkJoints()

unsigned short AtomsCore::JointChain::numIkJoints ( ) const
inline

Gets the number of joints available for IK solvers.

Returns
Number of joints available for IK solvers

◆ numJoints()

unsigned short AtomsCore::JointChain::numJoints ( ) const
inline

Gets the number of joints.

Returns
Number of joints

◆ numSkeletalJointIds()

unsigned short AtomsCore::JointChain::numSkeletalJointIds ( ) const
inline

Gets the number of joints in the skeleton between start and end (both included)

Returns
Number of joints in the skeletal chain

◆ parent()

const JointChain * AtomsCore::JointChain::parent ( ) const
inline

Gets the parent joint chain.

Returns
parent joint chain pointer

◆ setFootIk()

void AtomsCore::JointChain::setFootIk ( unsigned short  footIk)
inline

Sets the foot ik.

Parameters
footIkjoint id of the foot

◆ setFootTip()

void AtomsCore::JointChain::setFootTip ( unsigned short  footTip)
inline

Sets the footTip.

Parameters
footTipjoint id of the foot

◆ setForceOrientEnd()

void AtomsCore::JointChain::setForceOrientEnd ( bool  orientEnd)
inline

Sets if this chain orients the end joint after IK solver.

Parameters
orientEndflag value

◆ setForceUseFabrik()

void AtomsCore::JointChain::setForceUseFabrik ( bool  useFabrik)
inline

Sets if this chain computes forced fabrik.

Parameters
useFabrikflag value

◆ setFullName()

void AtomsCore::JointChain::setFullName ( const std::string &  fullName)
inline

Sets the jointChain full name.

Parameters
nameJointChain full name

◆ setHasFootIk()

void AtomsCore::JointChain::setHasFootIk ( bool  hasFootIk)
inline

Sets if this chain contains foot tip.

Parameters
hasFootIkflag value

◆ setHasFootTip()

void AtomsCore::JointChain::setHasFootTip ( bool  hasFoot)
inline

Sets if this chain contains foot ik.

Parameters
hasFootflag value

◆ setHasPelvis()

void AtomsCore::JointChain::setHasPelvis ( bool  hasPelvis)
inline

Sets if this chain contains pelvis.

Parameters
hasPelvisflag value

◆ setHasPoleVector()

void AtomsCore::JointChain::setHasPoleVector ( bool  hasPoleVector)
inline

Sets if this chain has pole vector.

Parameters
hasPoleVectorflag value

◆ setId()

void AtomsCore::JointChain::setId ( unsigned short  id)
inline

Sets the jointChain id.

Parameters
idJointChain id

◆ setIkJointIds()

void AtomsCore::JointChain::setIkJointIds ( std::vector< unsigned short >  ikIds)
inline

Sets the joint ids vector.

Parameters
ikIdsvector if joint ids in skeleton which are available for IK solvers

◆ setIsCenter()

void AtomsCore::JointChain::setIsCenter ( bool  isCenter)
inline

Sets if this chain is centered.

Parameters
isCenterflag value

◆ setIsConnectedToParent()

void AtomsCore::JointChain::setIsConnectedToParent ( bool  isConnected)
inline

Sets if this chain is directly connected to parent joint chain.

Parameters
isConnectedflag value

◆ setIsEffector()

void AtomsCore::JointChain::setIsEffector ( bool  isEffector)
inline

Sets if this chain is effector.

Parameters
isEffectorflag value

◆ setIsLimb()

void AtomsCore::JointChain::setIsLimb ( bool  isLimb)
inline

Sets if this chain is limb.

Parameters
isLimbflag value

◆ setIsRoot()

void AtomsCore::JointChain::setIsRoot ( bool  isRoot)
inline

Sets if this chain is root.

Parameters
isRootflag value

◆ setIsSpine()

void AtomsCore::JointChain::setIsSpine ( bool  isSpine)
inline

Sets if this chain is spine.

Parameters
isSpineflag value

◆ setJoint()

void AtomsCore::JointChain::setJoint ( const Joint joint,
unsigned short  i 
)
inline

Sets the joint at index i.

Parameters
jointJoint to set
iindex of the new joint

◆ setJointId()

void AtomsCore::JointChain::setJointId ( unsigned short  id,
unsigned short  i 
)
inline

Sets the joint at index i.

Parameters
idjoint id at index i
iindex of the new id

◆ setName()

void AtomsCore::JointChain::setName ( const std::string &  name)
inline

Sets the jointChain name.

Parameters
nameJointChain name

◆ setPelvisId()

void AtomsCore::JointChain::setPelvisId ( unsigned short  pelvisId)
inline

Sets the pelvis id.

Parameters
pelvisIdjoint id of the foot

◆ setPoleVector()

void AtomsCore::JointChain::setPoleVector ( AtomsCore::Vector3  poleVector)
inline

Sets this chain pole vector.

Parameters
poleVectorvalue

◆ start()

const JointPtr AtomsCore::JointChain::start ( ) const
inline

Gets the start joint.

Returns
start Joint

The documentation for this class was generated from the following files: