Developer Documentation

Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
SkeletonTransform Class Reference

Skeleton transformation class. More...

`#include <Type-Skeleton/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
Skeleton & | skeleton_
Skeleton::Pose * | refPose_

## 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 58 of file SkeletonTransform.hh.

## Member Function Documentation

## ◆ rotateJoint()

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

  _joint | Target joint
  _pose | Target pose
  _rotation | The rotation matrix that should be applied
  _applyToWholeAnimation | Should the relative rotation be applied to all frames of the animation?

Definition at line 285 of file SkeletonTransform.cc.

## ◆ scaleSkeleton()

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

scale all bones of the skeleton by the given factor

Parameters

  _factor | scale factor
  _pose | pose 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 65 of file SkeletonTransform.cc.

## ◆ transformJoint()

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

  _joint | Target joint
  _matrix | The transformation to apply
  _keepChildPositions | Keep the global positions of child joints

Definition at line 186 of file SkeletonTransform.cc.

## ◆ transformSkeleton()

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

transform the skeleton

transform the skeleton in the reference pose and all animations simultanously

Parameters

  _transformation | The transformation to apply
  _pose | The pose on which the transformation should be applied

Definition at line 143 of file SkeletonTransform.cc.

## ◆ translateJoint()

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

  _joint | Target joint
  _translation | The translation to apply
  _keepChildPositions | Keep the global positions of child joints

Definition at line 265 of file SkeletonTransform.cc.

## ◆ translateSkeleton()

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

  _translation | the translation vector
  _pose | pose 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 106 of file SkeletonTransform.cc.

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

- Type-Skeleton/ObjectTypes/Skeleton/Helper/SkeletonTransform.hh
- Type-Skeleton/ObjectTypes/Skeleton/Helper/SkeletonTransform.cc