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" virtual Matrix globalMatrixInv(unsigned int _joint) const
Simply returns the inverse of the global matrix.
virtual ~PoseT()
Destructor.
Matrix localMatrixInv(unsigned int _joint) const
Simply returns the inverse of the local matrix.
void setGlobalMatrix(unsigned int _joint, const Matrix &_global, bool _keepGlobalChildPositions=true)
Sets the global coordinate system.
const Matrix & unifiedMatrix(size_t _joint)
Returns the unified matrix.
void setGlobalTranslation(unsigned int _joint, const Vector &_position, bool _keepGlobalChildPositions=true)
Sets the global translation vector.
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...
std::vector< DualQuaternion > unifiedDualQuaternion_
DualQuaternion class for representing rigid motions in 3d.
Stores a single animation.
A general pose, used to store the frames of the animation.
void setLocalTranslation(unsigned int _joint, const Vector &_position, bool _keepLocalChildPositions=true)
Sets the local translation vector.
ACG::Vec3d Vector
Standard Type for 3d Vector used for scripting.
PoseT(SkeletonT< Point > *_skeleton)
Constructor.
const Matrix & localMatrix(unsigned int _joint) const
Returns the local matrix for the given joint.
std::vector< Matrix > unified_
the global pose matrix left-multiplied to the inverse global reference matrix:
virtual void insertJointAt(size_t _index)
Called by the skeleton/animation as a new joint is inserted.
std::vector< Matrix > local_
the pose in local coordinates
SkeletonT< PointT > * skeleton_
a pointer to the skeleton
const DualQuaternion & unifiedDualQuaternion(size_t _joint)
Returns a dual quaternion holding the unified matrix represented as dual quaternion.
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...
Vector localTranslation(unsigned int _joint)
Returns the local translation vector.
virtual void removeJointAt(size_t _index)
Called by the skeleton/animation as a joint is removed.
const Matrix & globalMatrix(unsigned int _joint) const
Returns the global matrix for the given joint.
void setLocalMatrix(unsigned int _joint, const Matrix &_local, bool _keepLocalChildPositions=true)
Sets the local coordinate system.
std::vector< Matrix > global_
the pose in global coordinates
Vector globalTranslation(unsigned int _joint)
Returns the global translation vector.