44 #include "SkeletonTransform.hh" 77 if ( _pose == refPose_){
80 for (
unsigned int iFrame = 0; iFrame < skeleton_.
animation(a)->frameCount(); iFrame++){
84 if ( pose == refPose_ )
116 if ( _pose == refPose_ ){
120 for (
unsigned int iFrame = 0; iFrame < skeleton_.
animation(a)->frameCount(); iFrame++){
124 if ( pose == refPose_ )
153 if ( _pose == refPose_ ){
157 for (
unsigned int iFrame = 0; iFrame < skeleton_.
animation(a)->frameCount(); iFrame++){
161 if ( pose == refPose_ )
223 for (
unsigned int iFrame = 0; iFrame < skeleton_.
animation(a)->frameCount(); iFrame++){
268 transformation.
translate( _translation );
291 std::cerr <<
"Cannot rotate joint. Matrix is not a rotation matrix (det:" <<
determinant(_rotation) <<
")" << std::endl;
314 if ( (_pose == refPose_) || !_applyToWholeAnimation ){
330 if ( _applyToWholeAnimation ){
333 for (
unsigned int iFrame = 0; iFrame < skeleton_.
animation(a)->frameCount(); iFrame++){
361 _m(0,3) * _m(1,2) * _m(2,1) * _m(3,0)-_m(0,2) * _m(1,3) * _m(2,1) * _m(3,0)-_m(0,3) * _m(1,1) * _m(2,2) * _m(3,0)+_m(0,1) * _m(1,3) * _m(2,2) * _m(3,0)+
362 _m(0,2) * _m(1,1) * _m(2,3) * _m(3,0)-_m(0,1) * _m(1,2) * _m(2,3) * _m(3,0)-_m(0,3) * _m(1,2) * _m(2,0) * _m(3,1)+_m(0,2) * _m(1,3) * _m(2,0) * _m(3,1)+
363 _m(0,3) * _m(1,0) * _m(2,2) * _m(3,1)-_m(0,0) * _m(1,3) * _m(2,2) * _m(3,1)-_m(0,2) * _m(1,0) * _m(2,3) * _m(3,1)+_m(0,0) * _m(1,2) * _m(2,3) * _m(3,1)+
364 _m(0,3) * _m(1,1) * _m(2,0) * _m(3,2)-_m(0,1) * _m(1,3) * _m(2,0) * _m(3,2)-_m(0,3) * _m(1,0) * _m(2,1) * _m(3,2)+_m(0,0) * _m(1,3) * _m(2,1) * _m(3,2)+
365 _m(0,1) * _m(1,0) * _m(2,3) * _m(3,2)-_m(0,0) * _m(1,1) * _m(2,3) * _m(3,2)-_m(0,2) * _m(1,1) * _m(2,0) * _m(3,3)+_m(0,1) * _m(1,2) * _m(2,0) * _m(3,3)+
366 _m(0,2) * _m(1,0) * _m(2,1) * _m(3,3)-_m(0,0) * _m(1,2) * _m(2,1) * _m(3,3)-_m(0,1) * _m(1,0) * _m(2,2) * _m(3,3)+_m(0,0) * _m(1,1) * _m(2,2) * _m(3,3);
virtual Matrix globalMatrixInv(unsigned int _joint) const
Simply returns the inverse of the global matrix.
Iterator end()
Compare an iterator with the return value of this method to test if it is done.
Matrix localMatrixInv(unsigned int _joint) const
Simply returns the inverse of the local matrix.
size_t id() const
returns the joint id
void setGlobalTranslation(unsigned int _joint, const Vector &_position, bool _keepGlobalChildPositions=true)
Sets the global translation vector.
void translate(Scalar _x, Scalar _y, Scalar _z, MultiplyFrom _mult_from=MULT_FROM_RIGHT)
multiply self with translation matrix (x,y,z)
void identity()
setup an identity matrix
A general pose, used to store the frames of the animation.
Iterator begin()
Iterator over joints of the skeletal tree in TOP-DOWN order (from root to leafs)
void setLocalTranslation(unsigned int _joint, const Vector &_position, bool _keepLocalChildPositions=true)
Sets the local translation vector.
Functions for geometric operations related to angles.
Represents a single joint in the skeleton.
Pose * referencePose()
Returns a pointer to the reference pose.
const Matrix & localMatrix(unsigned int _joint) const
Returns the local matrix for the given joint.
Iterator class for the skeleton.
Animation * animation(std::string _name)
Returns a pointer to the animation to the given name.
Joint * parent()
Returns the parent joint.
size_t animationCount()
Returns the number of animations stored in this skeleton.
Vector localTranslation(unsigned int _joint)
Returns the local translation vector.
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.
Vector globalTranslation(unsigned int _joint)
Returns the global translation vector.