44 #include "ACG/Math/Matrix4x4T.hh" 46 #include "ACG/Math/QuaternionT.hh" 47 #include "ACG/Math/DualQuaternionT.hh" 50 template<
typename Po
intT>
57 template<
typename Po
intT>
69 typedef typename Point::value_type Scalar;
94 inline const Matrix&
localMatrix(
unsigned int _joint)
const;
95 void setLocalMatrix(
unsigned int _joint,
const Matrix &_local,
bool _keepLocalChildPositions=
true);
97 void setLocalTranslation(
unsigned int _joint,
const Vector &_position,
bool _keepLocalChildPositions=
true);
103 inline const Matrix&
globalMatrix(
unsigned int _joint)
const;
104 void setGlobalMatrix(
unsigned int _joint,
const Matrix &_global,
bool _keepGlobalChildPositions=
true);
106 void setGlobalTranslation(
unsigned int _joint,
const Vector &_position,
bool _keepGlobalChildPositions=
true);
195 #if defined(INCLUDE_TEMPLATES) && !defined(POSET_C) 196 #define POSET_TEMPLATES 197 #include "PoseT_impl.hh" void setLocalMatrix(unsigned int _joint, const Matrix &_local, bool _keepLocalChildPositions=true)
Sets the local coordinate system.
virtual void insertJointAt(size_t _index)
Called by the skeleton/animation as a new joint is inserted.
const DualQuaternion & unifiedDualQuaternion(size_t _joint)
Returns a dual quaternion holding the unified matrix represented as dual quaternion.
Vector globalTranslation(unsigned int _joint)
Returns the global translation vector.
const Matrix & globalMatrix(unsigned int _joint) const
Returns the global matrix for the given joint.
const Matrix & localMatrix(unsigned int _joint) const
Returns the local matrix for the given joint.
void setGlobalTranslation(unsigned int _joint, const Vector &_position, bool _keepGlobalChildPositions=true)
Sets the global translation vector.
void setGlobalMatrix(unsigned int _joint, const Matrix &_global, bool _keepGlobalChildPositions=true)
Sets the global coordinate system.
Matrix localMatrixInv(unsigned int _joint) const
Simply returns the inverse of the local matrix.
A general pose, used to store the frames of the animation.
virtual Matrix globalMatrixInv(unsigned int _joint) const
Simply returns the inverse of the global matrix.
Vector localTranslation(unsigned int _joint)
Returns the local translation vector.
std::vector< Matrix > local_
the pose in local coordinates
std::vector< Matrix > global_
the pose in global coordinates
virtual ~PoseT()
Destructor.
std::vector< DualQuaternion > unifiedDualQuaternion_
const Quaternion & unifiedRotation(size_t _joint)
Returns a quaternion holding the rotational part of the unified matrix.
void updateFromLocal(size_t _joint, bool _keepChildPositions=true)
This method propagates the change in the local coordinate system to the global system and all childre...
void setLocalTranslation(unsigned int _joint, const Vector &_position, bool _keepLocalChildPositions=true)
Sets the local translation vector.
PoseT(SkeletonT< Point > *_skeleton)
Constructor.
DualQuaternion class for representing rigid motions in 3d.
const Matrix & unifiedMatrix(size_t _joint)
Returns the unified matrix.
void updateFromGlobal(size_t _joint, bool _keepChildPositions=true)
This method propagates the change in the global coordinate system to the local system and all childre...
Stores a single animation.
virtual void removeJointAt(size_t _index)
Called by the skeleton/animation as a joint is removed.
SkeletonT< PointT > * skeleton_
a pointer to the skeleton
ACG::Vec3d Vector
Standard Type for 3d Vector used for scripting.
std::vector< Matrix > unified_
the global pose matrix left-multiplied to the inverse global reference matrix: