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