58 template<
typename Po
intT>
61 assert(_skeleton != 0);
75 template<
typename Po
intT>
90 template<
typename Po
intT>
103 template<
typename Po
intT>
119 template<
typename Po
intT>
138 template<
typename Po
intT>
143 for(
int i = 0; i < 3; ++i)
160 template<
typename Po
intT>
164 for(
int i = 0; i < 3; ++i)
165 mat(i, 3) = _position[i];
175 template<
typename Po
intT>
192 template<
typename Po
intT>
210 template<
typename Po
intT>
226 template<
typename Po
intT>
231 for(
int i = 0; i < 3; ++i)
248 template<
typename Po
intT>
252 for(
int i = 0; i < 3; ++i)
253 mat(i, 3) = _position[i];
266 template<
typename Po
intT>
269 if (_joint >=
global_.size()) {
270 std::cerr <<
"Illegal joint number: " << _joint << std::endl;
280 template<
typename Po
intT>
297 template<
typename Po
intT>
314 template<
typename Po
intT>
324 Matrix matRefGlobalInv =
skeleton_->referencePose()->globalMatrix(_joint);
331 if (_keepChildPositions) {
333 for(
size_t i = 0; i <
skeleton_->childCount(_joint); ++i) {
352 template<
typename Po
intT>
362 Matrix matRefGlobalInv =
skeleton_->referencePose()->globalMatrix(_joint);
369 if (_keepChildPositions) {
370 for(
size_t i = 0; i <
skeleton_->childCount(_joint); ++i) {
396 template<
typename Po
intT>
414 template<
typename Po
intT>
430 template<
typename Po
intT>
bool invert()
matrix inversion (returns true on success)
Skeleton * skeleton_
Pointer to associated skeleton.
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...
void identity()
setup an identity matrix
virtual void removeJointAt(size_t _index)
Called by the skeleton/animation as a joint is removed.
SkeletonT< PointT > * skeleton_
a pointer to the skeleton
static DualQuaternion identity()
identity dual quaternion [ R(1, 0, 0, 0), D(0,0,0,0) ]
std::vector< Matrix > unified_
the global pose matrix left-multiplied to the inverse global reference matrix: