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>
virtual Matrix globalMatrixInv(unsigned int _joint) const
Simply returns the inverse of the global matrix.
virtual ~PoseT()
Destructor.
Matrix localMatrixInv(unsigned int _joint) const
Simply returns the inverse of the local matrix.
void setGlobalMatrix(unsigned int _joint, const Matrix &_global, bool _keepGlobalChildPositions=true)
Sets the global coordinate system.
const Matrix & unifiedMatrix(size_t _joint)
Returns the unified matrix.
void setGlobalTranslation(unsigned int _joint, const Vector &_position, bool _keepGlobalChildPositions=true)
Sets the global translation vector.
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...
Skeleton * skeleton_
Pointer to associated skeleton.
std::vector< DualQuaternion > unifiedDualQuaternion_
DualQuaternion class for representing rigid motions in 3d.
void identity()
setup an identity matrix
A general pose, used to store the frames of the animation.
static DualQuaternion identity()
identity dual quaternion [ R(1, 0, 0, 0), D(0,0,0,0) ]
void setLocalTranslation(unsigned int _joint, const Vector &_position, bool _keepLocalChildPositions=true)
Sets the local translation vector.
bool invert()
matrix inversion (returns true on success)
PoseT(SkeletonT< Point > *_skeleton)
Constructor.
const Matrix & localMatrix(unsigned int _joint) const
Returns the local matrix for the given joint.
std::vector< Matrix > unified_
the global pose matrix left-multiplied to the inverse global reference matrix:
virtual void insertJointAt(size_t _index)
Called by the skeleton/animation as a new joint is inserted.
std::vector< Matrix > local_
the pose in local coordinates
SkeletonT< PointT > * skeleton_
a pointer to the skeleton
const DualQuaternion & unifiedDualQuaternion(size_t _joint)
Returns a dual quaternion holding the unified matrix represented as dual quaternion.
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...
Vector localTranslation(unsigned int _joint)
Returns the local translation vector.
virtual void removeJointAt(size_t _index)
Called by the skeleton/animation as a joint is removed.
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.
std::vector< Matrix > global_
the pose in global coordinates
Vector globalTranslation(unsigned int _joint)
Returns the global translation vector.