10 #include <AtomsCore/Globals.h>
11 #include <AtomsCore/AtomsMath.h>
12 #include <AtomsCore/Joint.h>
13 #include <AtomsCore/Poser.h>
58 inline const std::string& name()
const;
64 inline void setName(
const std::string& name);
70 inline const std::string& fullName()
const;
76 inline void setFullName(
const std::string& fullName);
82 inline unsigned short id()
const;
88 inline void setId(
unsigned short id);
108 inline unsigned short jointId(
unsigned short i)
const;
113 inline const std::vector<unsigned short>& ikJointIds()
const;
118 inline const std::vector<unsigned short>& skeletalJointIds()
const;
124 inline const BindData& bindData(
unsigned short i)
const;
131 inline void setJoint(
const Joint& joint,
unsigned short i);
138 inline void setJointId(
unsigned short id,
unsigned short i);
144 inline void setIkJointIds(std::vector<unsigned short> ikIds);
150 inline unsigned short numJoints()
const;
156 inline unsigned short numIkJoints()
const;
162 inline unsigned short numSkeletalJointIds()
const;
168 inline const std::vector<unsigned short>& jointIds()
const;
185 inline const JointPtr start()
const;
206 inline bool isConnectedToParent()
const;
212 inline void setIsConnectedToParent(
bool isConnected);
217 inline bool isRoot()
const;
223 inline void setIsRoot(
bool isRoot);
228 inline bool isSpine()
const;
234 inline void setIsSpine(
bool isSpine);
239 inline bool isLimb()
const;
245 inline void setIsLimb(
bool isLimb);
250 inline bool isEffector()
const;
256 inline void setIsEffector(
bool isEffector);
261 inline bool isCenter()
const;
267 inline void setIsCenter(
bool isCenter);
272 inline bool forceUseFabrik()
const;
278 inline void setForceUseFabrik(
bool useFabrik);
283 inline bool forceOrientEnd()
const;
289 inline void setForceOrientEnd(
bool orientEnd);
294 inline bool hasFootTip()
const;
300 inline void setHasFootIk(
bool hasFootIk);
305 inline bool hasFootIk()
const;
311 inline void setHasFootTip(
bool hasFoot);
316 inline bool hasPelvis()
const;
322 inline void setHasPelvis(
bool hasPelvis);
327 inline bool hasPoleVector()
const;
333 inline void setHasPoleVector(
bool hasPoleVector);
349 inline unsigned short footTip()
const;
355 inline void setFootTip(
unsigned short footTip);
360 inline unsigned short footIk()
const;
366 inline void setFootIk(
unsigned short footIk);
371 inline unsigned short pelvisId()
const;
377 inline void setPelvisId(
unsigned short pelvisId);
387 inline double length()
const;
392 inline void setLength(
double len);
407 inline double start2endBindDistance()
const;
414 const unsigned int jointId,
427 inline void setParentSpine(
unsigned short spineJointId,
const AtomsCore::Vector3& planeNormal,
double baseSize);
433 inline const unsigned int spineJointId()
const;
436 inline const double spineBaseSize()
const;
447 std::string m_fullName;
453 unsigned short m_numJoints;
459 std::vector<unsigned short> m_jointIds;
462 std::vector<unsigned short> m_ikJointIds;
465 std::vector<unsigned short> m_skeletalJointIds;
468 std::vector<BindData> m_jointBindData;
480 unsigned short m_footTip;
483 unsigned short m_footIk;
486 unsigned short m_pelvisId;
498 unsigned short m_spineId;
501 double m_spineBaseSize;
504 double m_start2endBindDistance;
507 bool m_isConnectedToParent;
525 bool m_forceUseFabrik;
528 bool m_forceOrientEnd;
540 bool m_hasPoleVector;
545 ATOMSCORE_EXPORT std::ostream& operator<<(std::ostream& os,
const AtomsCore::JointChain& jointChain);
547 #include "JointChain.impl.h"
JointChain class.
Definition: JointChain.h:31
void computeSkeletalJointIds(const AtomsCore::Skeleton &skeleton)
Sets the skeletal joint ids vector navigating on the skeleton.
const Joint & joint(unsigned short i) const
Gets a joint.
Joint & joint(unsigned short i)
Gets a joint.
JointChain(const JointChain &rhs)
Copy constructor.
void setStart()
Refresh pointer to the start joint.
void computeLength()
Computes the length of the chain.
JointChain & operator=(const JointChain &ptr)
Assign operator.
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.
JointChain(unsigned short numberOfJoints)
Constructor.
void computeWorldBindData(const AtomsCore::Skeleton &skeleton, const AtomsCore::Poser &poser)
Computes the world bind data of every joint in chain.
void setEnd()
Refresh pointer to the end joint.
Joint class.
Definition: Joint.h:30
Poser class.
Definition: Poser.h:24
Skeleton class.
Definition: Skeleton.h:68
AtomsCore namespace.
Definition: Agent.h:344
std::vector< JointChainPtr > JointChainPtrArray
Vector fo jointChain pointers.
Definition: JointChain.h:25
AtomsMath::Quaternion Quaternion
Quaternion class.
Definition: AtomsMath.h:67
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
const JointChain * JointChainCPtr
JointChain const pointer.
Definition: JointChain.h:23
AtomsMath::Matrix Matrix
Matrix class.
Definition: AtomsMath.h:63
AtomsMath::Euler Euler
Euler class.
Definition: AtomsMath.h:69
JointChain * JointChainPtr
JointChain pointer.
Definition: JointChain.h:19
Definition: JointChain.h:36