Developer Documentation
SkeletonTransform Class Reference

Skeleton transformation class. More...

#include <ObjectTypes/Skeleton/Helper/SkeletonTransform.hh>

Public Member Functions

 SkeletonTransform (Skeleton &_skeleton)
 Le constructeur.
 
void scaleSkeleton (double _factor, Skeleton::Pose *_pose=0)
 scale all bones of the skeleton by the given factor More...
 
void translateSkeleton (ACG::Vec3d _translation, Skeleton::Pose *_pose=0)
 translate the skeleton More...
 
void transformSkeleton (Matrix4x4 _transformation, Skeleton::Pose *_pose=0)
 transform the skeleton More...
 
void translateJoint (Skeleton::Joint *_joint, ACG::Vec3d _translation, bool _keepChildPositions=true)
 apply a translation to a joint in the refPose More...
 
void transformJoint (Skeleton::Joint *_joint, Matrix4x4 _matrix, bool _keepChildPositions=true)
 apply a transformation to a joint in the refPose More...
 
void rotateJoint (Skeleton::Joint *_joint, Skeleton::Pose *_pose, Matrix4x4 _rotation, bool _applyToWholeAnimation=true)
 rotate a joint in an arbitrary Pose More...
 

Static Public Member Functions

static double determinant (Matrix4x4 &_m)
 compute determinant to check if matrix is rotation matrix
 

Private Attributes

Skeletonskeleton_
 
Skeleton::PoserefPose_
 

Detailed Description

Skeleton transformation class.

This class should be used to manipulate skeletons since it makes sure that all necessary transformations are applied and that the transformations do not mess up the skeleton

Definition at line 64 of file SkeletonTransform.hh.

Member Function Documentation

void SkeletonTransform::rotateJoint ( Skeleton::Joint _joint,
Skeleton::Pose _pose,
Matrix4x4  _rotation,
bool  _applyToWholeAnimation = true 
)

rotate a joint in an arbitrary Pose

Rotate a joint in an arbitrary Pose.

Rotate a joint in the given pose and with the given rotation matrix.

Parameters
_jointTarget joint
_poseTarget pose
_rotationThe rotation matrix that should be applied
_applyToWholeAnimationShould the relative rotation be applied to all frames of the animation?

Definition at line 291 of file SkeletonTransform.cc.

void SkeletonTransform::scaleSkeleton ( double  _factor,
Skeleton::Pose _pose = 0 
)

scale all bones of the skeleton by the given factor

Parameters
_factorscale factor
_posepose that should be scaled. if this is the refPose, all animations of the skeleton are scaled as well so that refPose and the animations have the same size. scaling other poses should only be used for intermediate poses. if _pose is NULL the refPose is used.

Definition at line 71 of file SkeletonTransform.cc.

void SkeletonTransform::transformJoint ( Skeleton::Joint _joint,
Matrix4x4  _matrix,
bool  _keepChildPositions = true 
)

apply a transformation to a joint in the refPose

apply a transformation to a joint in the refPose. this also applies suitable transformations to all animation-frames.

it's only possible to apply transformations to the refPose. applying transformations to animation poses does not make much sense. Use rotateJoint to change joint positions during the animation.

Parameters
_jointTarget joint
_matrixThe transformation to apply
_keepChildPositionsKeep the global positions of child joints

Definition at line 192 of file SkeletonTransform.cc.

void SkeletonTransform::transformSkeleton ( Matrix4x4  _transformation,
Skeleton::Pose _pose = 0 
)

transform the skeleton

transform the skeleton in the reference pose and all animations simultanously

Parameters
_transformationThe transformation to apply
_poseThe pose on which the transformation should be applied

Definition at line 149 of file SkeletonTransform.cc.

void SkeletonTransform::translateJoint ( Skeleton::Joint _joint,
ACG::Vec3d  _translation,
bool  _keepChildPositions = true 
)

apply a translation to a joint in the refPose

apply a translateion to a joint in the refPose

apply a translation to a joint in the refPose. this also applies suitable transformations to all animation-frames.

it's only possible to apply translations to the refPose. applying translations to animation poses does not make much sense. Use rotateJoint to change joint positions during the animation.

Parameters
_jointTarget joint
_translationThe translation to apply
_keepChildPositionsKeep the global positions of child joints

Definition at line 271 of file SkeletonTransform.cc.

void SkeletonTransform::translateSkeleton ( ACG::Vec3d  _translation,
Skeleton::Pose _pose = 0 
)

translate the skeleton

translates the skeleton in the reference pose and all animations simultanously

Parameters
_translationthe translation vector
_posepose that should be translated. if this is the refPose, all animations of the skeleton are scaled as well so that refPose and the animations have the same size. scaling other poses should only be used for intermediate poses. if _pose is NULL the refPose is used.

Definition at line 112 of file SkeletonTransform.cc.


The documentation for this class was generated from the following files: