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