Commit 38129ec6 authored by Dirk Wilden's avatar Dirk Wilden
Browse files

adjusted animation classes to new skeleton type

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11059 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0be64336
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* Both the reference pose and the skeleton hierarchy are not used by the animation class itself, but are * Both the reference pose and the skeleton hierarchy are not used by the animation class itself, but are
* passed to the poses. * passed to the poses.
*/ */
template<typename PointT> template<class PointT>
class AnimationT class AnimationT
{ {
template<typename> template<typename>
......
...@@ -59,7 +59,7 @@ using namespace std; ...@@ -59,7 +59,7 @@ using namespace std;
* *
* @param _pose This pose will make up the only frame in this new animation * @param _pose This pose will make up the only frame in this new animation
*/ */
template<typename PointT> template<class PointT>
FrameAnimationT<PointT>::FrameAnimationT(const PoseT<PointT> &_pose) : FrameAnimationT<PointT>::FrameAnimationT(const PoseT<PointT> &_pose) :
skeleton_(_pose.skeleton_) skeleton_(_pose.skeleton_)
{ {
...@@ -74,7 +74,7 @@ FrameAnimationT<PointT>::FrameAnimationT(const PoseT<PointT> &_pose) : ...@@ -74,7 +74,7 @@ FrameAnimationT<PointT>::FrameAnimationT(const PoseT<PointT> &_pose) :
* @param _hierarchy The skeleton that will hold this animation * @param _hierarchy The skeleton that will hold this animation
* @param _reference The skeletons reference pose * @param _reference The skeletons reference pose
*/ */
template<typename PointT> template<class PointT>
FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton) : FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton) :
skeleton_(_skeleton) skeleton_(_skeleton)
{ {
...@@ -92,7 +92,7 @@ FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton) : ...@@ -92,7 +92,7 @@ FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton) :
* @param _reference The skeletons reference pose * @param _reference The skeletons reference pose
* @param _iNumFrames The number of frames for this animation * @param _iNumFrames The number of frames for this animation
*/ */
template<typename PointT> template<class PointT>
FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton, unsigned int _iNumFrames) : FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton, unsigned int _iNumFrames) :
skeleton_(_skeleton) skeleton_(_skeleton)
{ {
...@@ -110,7 +110,7 @@ FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton, unsigned int _iNum ...@@ -110,7 +110,7 @@ FrameAnimationT<PointT>::FrameAnimationT(Skeleton* _skeleton, unsigned int _iNum
* *
* @param _other The animation to copy from * @param _other The animation to copy from
*/ */
template<typename PointT> template<class PointT>
FrameAnimationT<PointT>::FrameAnimationT(const FrameAnimationT<PointT> &_other) : FrameAnimationT<PointT>::FrameAnimationT(const FrameAnimationT<PointT> &_other) :
AnimationT<PointT>(), AnimationT<PointT>(),
skeleton_(_other.skeleton_) skeleton_(_other.skeleton_)
...@@ -124,7 +124,7 @@ FrameAnimationT<PointT>::FrameAnimationT(const FrameAnimationT<PointT> &_other) ...@@ -124,7 +124,7 @@ FrameAnimationT<PointT>::FrameAnimationT(const FrameAnimationT<PointT> &_other)
/** /**
* @brief Destructor * @brief Destructor
*/ */
template<typename PointT> template<class PointT>
FrameAnimationT<PointT>::~FrameAnimationT() FrameAnimationT<PointT>::~FrameAnimationT()
{ {
for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it) for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
...@@ -137,7 +137,7 @@ FrameAnimationT<PointT>::~FrameAnimationT() ...@@ -137,7 +137,7 @@ FrameAnimationT<PointT>::~FrameAnimationT()
/** /**
* @brief Copy Function * @brief Copy Function
*/ */
template<typename PointT> template<class PointT>
AnimationT<PointT>* FrameAnimationT<PointT>::copy() { AnimationT<PointT>* FrameAnimationT<PointT>::copy() {
return new FrameAnimationT<PointT>(*this); return new FrameAnimationT<PointT>(*this);
} }
...@@ -149,7 +149,7 @@ AnimationT<PointT>* FrameAnimationT<PointT>::copy() { ...@@ -149,7 +149,7 @@ AnimationT<PointT>* FrameAnimationT<PointT>::copy() {
* *
* @param _iFrame The poses frame number * @param _iFrame The poses frame number
*/ */
template<typename PointT> template<class PointT>
typename FrameAnimationT<PointT>::Pose *FrameAnimationT<PointT>::pose(unsigned int _iFrame) typename FrameAnimationT<PointT>::Pose *FrameAnimationT<PointT>::pose(unsigned int _iFrame)
{ {
assert(_iFrame < poses_.size()); assert(_iFrame < poses_.size());
...@@ -162,7 +162,7 @@ typename FrameAnimationT<PointT>::Pose *FrameAnimationT<PointT>::pose(unsigned i ...@@ -162,7 +162,7 @@ typename FrameAnimationT<PointT>::Pose *FrameAnimationT<PointT>::pose(unsigned i
/** /**
* @brief Returns the number of frames stored in this pose * @brief Returns the number of frames stored in this pose
*/ */
template<typename PointT> template<class PointT>
unsigned int FrameAnimationT<PointT>::frameCount() unsigned int FrameAnimationT<PointT>::frameCount()
{ {
return poses_.size(); return poses_.size();
...@@ -170,7 +170,7 @@ unsigned int FrameAnimationT<PointT>::frameCount() ...@@ -170,7 +170,7 @@ unsigned int FrameAnimationT<PointT>::frameCount()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
template<typename PointT> template<class PointT>
void FrameAnimationT<PointT>::setFrameCount(unsigned int _frames) void FrameAnimationT<PointT>::setFrameCount(unsigned int _frames)
{ {
//delete poses //delete poses
...@@ -195,7 +195,7 @@ void FrameAnimationT<PointT>::setFrameCount(unsigned int _frames) ...@@ -195,7 +195,7 @@ void FrameAnimationT<PointT>::setFrameCount(unsigned int _frames)
* @param _index The new joint is inserted at this position. Insert new joints at the end by passing * @param _index The new joint is inserted at this position. Insert new joints at the end by passing
* SkeletonT::joints_.size as parameter. * SkeletonT::joints_.size as parameter.
*/ */
template<typename PointT> template<class PointT>
void FrameAnimationT<PointT>::insertJointAt(unsigned int _index) void FrameAnimationT<PointT>::insertJointAt(unsigned int _index)
{ {
for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it) for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
...@@ -211,7 +211,7 @@ void FrameAnimationT<PointT>::insertJointAt(unsigned int _index) ...@@ -211,7 +211,7 @@ void FrameAnimationT<PointT>::insertJointAt(unsigned int _index)
* *
* @param _index The index of the joint that is being deleted. * @param _index The index of the joint that is being deleted.
*/ */
template<typename PointT> template<class PointT>
void FrameAnimationT<PointT>::removeJointAt(unsigned int _index) void FrameAnimationT<PointT>::removeJointAt(unsigned int _index)
{ {
for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it) for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
...@@ -227,7 +227,7 @@ void FrameAnimationT<PointT>::removeJointAt(unsigned int _index) ...@@ -227,7 +227,7 @@ void FrameAnimationT<PointT>::removeJointAt(unsigned int _index)
* *
* @param _index The joints index * @param _index The joints index
*/ */
template<typename PointT> template<class PointT>
void FrameAnimationT<PointT>::updateFromGlobal(unsigned int _index) void FrameAnimationT<PointT>::updateFromGlobal(unsigned int _index)
{ {
for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it) for(typename vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "AnimationT.hh" #include "AnimationT.hh"
template<typename PointT> template<class PointT>
class FrameAnimationT : public AnimationT<PointT> class FrameAnimationT : public AnimationT<PointT>
{ {
template<typename> template<typename>
......
...@@ -60,11 +60,10 @@ using namespace std; ...@@ -60,11 +60,10 @@ using namespace std;
* *
* @param _other The animation to copy from * @param _other The animation to copy from
*/ */
template<typename Scalar> template<class PointT>
InterpolationAnimationT<Scalar>::InterpolationAnimationT(const InterpolationAnimationT<Scalar> &_other) : InterpolationAnimationT<PointT>::InterpolationAnimationT(const InterpolationAnimationT<PointT> &_other) :
AnimationT<Scalar>(_other.name_), AnimationT<PointT>(_other.name_),
hierarchy_(_other.hierarchy_), skeleton_(_other.skeleton_),
reference_(_other.reference_),
matrixManipulator_(_other.matrixManipulator_), matrixManipulator_(_other.matrixManipulator_),
frames_(0) frames_(0)
{ {
...@@ -79,10 +78,9 @@ InterpolationAnimationT<Scalar>::InterpolationAnimationT(const InterpolationAnim ...@@ -79,10 +78,9 @@ InterpolationAnimationT<Scalar>::InterpolationAnimationT(const InterpolationAnim
* @param _hierarchy The skeleton that will hold this animation * @param _hierarchy The skeleton that will hold this animation
* @param _reference The skeletons reference pose * @param _reference The skeletons reference pose
*/ */
template<typename Scalar> template<class PointT>
InterpolationAnimationT<Scalar>::InterpolationAnimationT(SkeletonHierarchyI *_hierarchy, ReferencePose *_reference, MatrixManipulator *_matrixManipulator) : InterpolationAnimationT<PointT>::InterpolationAnimationT(Skeleton* _skeleton, MatrixManipulator *_matrixManipulator) :
hierarchy_(_hierarchy), skeleton_(_skeleton),
reference_(_reference),
matrixManipulator_(_matrixManipulator), matrixManipulator_(_matrixManipulator),
frames_(0) frames_(0)
{ {
...@@ -91,27 +89,25 @@ InterpolationAnimationT<Scalar>::InterpolationAnimationT(SkeletonHierarchyI *_hi ...@@ -91,27 +89,25 @@ InterpolationAnimationT<Scalar>::InterpolationAnimationT(SkeletonHierarchyI *_hi
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
InterpolationAnimationT<Scalar>::~InterpolationAnimationT() InterpolationAnimationT<PointT>::~InterpolationAnimationT()
{ {
clearPoseCache(); clearPoseCache();
delete hierarchy_;
delete reference_;
} }
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
AnimationT<Scalar>* InterpolationAnimationT<Scalar>::copy() { AnimationT<PointT>* InterpolationAnimationT<PointT>::copy() {
return new InterpolationAnimationT<Scalar>(*this); return new InterpolationAnimationT<PointT>(*this);
} }
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame) PoseT<PointT>* InterpolationAnimationT<PointT>::pose(unsigned int _iFrame)
{ {
return getPose(_iFrame, reference_); return pose(_iFrame, skeleton_->referencePose());
} }
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
...@@ -122,8 +118,8 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame) ...@@ -122,8 +118,8 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame)
* @param _iFrame The frame number for which the pose should be calculated. * @param _iFrame The frame number for which the pose should be calculated.
* This is always from 0..#frames even if the animation starts with an input value other than 0. * This is always from 0..#frames even if the animation starts with an input value other than 0.
*/ */
template<typename Scalar> template<class PointT>
PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame, Pose* _reference) PoseT<PointT>* InterpolationAnimationT<PointT>::pose(unsigned int _iFrame, Pose* _reference)
{ {
// std::cerr << "Frame " << _iFrame << ": "; // std::cerr << "Frame " << _iFrame << ": ";
...@@ -135,7 +131,7 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame, P ...@@ -135,7 +131,7 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame, P
if (_iFrame == 0) { if (_iFrame == 0) {
interpolatedPoses_.insert( make_pair(0, new Pose(*_reference)) ); interpolatedPoses_.insert( make_pair(0, new Pose(*_reference)) );
// std::cerr << "Insert reference to posecache. &_reference: " << _reference << ", &cacheref: " << getPose(_iFrame, _reference) << std::endl; // std::cerr << "Insert reference to posecache. &_reference: " << _reference << ", &cacheref: " << getPose(_iFrame, _reference) << std::endl;
return getPose(_iFrame, _reference); return pose(_iFrame, _reference);
} else { } else {
//Find the correct interpolator //Find the correct interpolator
Interpolator* interpolator = NULL; Interpolator* interpolator = NULL;
...@@ -162,13 +158,13 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame, P ...@@ -162,13 +158,13 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame, P
Pose *generatedPose = new Pose(*_reference); Pose *generatedPose = new Pose(*_reference);
for (uint i=0; i<influencedJoints_.size(); ++i) { for (uint i=0; i<influencedJoints_.size(); ++i) {
ACG::GLMatrixT<Scalar> transformation(generatedPose->getGlobal(influencedJoints_[i]).raw()); ACG::GLMatrixT<Scalar> transformation(generatedPose->globalMatrix(influencedJoints_[i]).raw());
//The frames for each interpolator are stored from 0..max, i.e. in "interpolator local time space". //The frames for each interpolator are stored from 0..max, i.e. in "interpolator local time space".
// So, they have to be mapped to the global space here. // So, they have to be mapped to the global space here.
TargetType precalcVal = precalculations_[interpolator][_iFrame - min]; TargetType precalcVal = precalculations_[interpolator][_iFrame - min];
matrixManipulator_->doManipulation(transformation, precalcVal); matrixManipulator_->doManipulation(transformation, precalcVal);
generatedPose->setGlobal(influencedJoints_[i], transformation, false); generatedPose->setGlobalMatrix(influencedJoints_[i], transformation, false);
} }
// std::cerr << std::endl; // std::cerr << std::endl;
...@@ -186,8 +182,8 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame, P ...@@ -186,8 +182,8 @@ PoseT<Scalar>* InterpolationAnimationT<Scalar>::getPose(unsigned long _iFrame, P
/** /**
* @brief Returns the number of frames stored in this pose * @brief Returns the number of frames stored in this pose
*/ */
template<typename Scalar> template<class PointT>
unsigned long InterpolationAnimationT<Scalar>::getFrameCount() unsigned int InterpolationAnimationT<PointT>::frameCount()
{ {
return frames_; return frames_;
} }
...@@ -202,8 +198,8 @@ unsigned long InterpolationAnimationT<Scalar>::getFrameCount() ...@@ -202,8 +198,8 @@ unsigned long InterpolationAnimationT<Scalar>::getFrameCount()
* @param _index The new joint is inserted at this position. Insert new joints at the end by passing * @param _index The new joint is inserted at this position. Insert new joints at the end by passing
* SkeletonT::joints_.size as parameter. * SkeletonT::joints_.size as parameter.
*/ */
template<typename Scalar> template<class PointT>
void InterpolationAnimationT<Scalar>::insert_at(unsigned long _index) void InterpolationAnimationT<PointT>::insertJointAt(unsigned int _index)
{ {
//NOOP //NOOP
} }
...@@ -217,8 +213,8 @@ void InterpolationAnimationT<Scalar>::insert_at(unsigned long _index) ...@@ -217,8 +213,8 @@ void InterpolationAnimationT<Scalar>::insert_at(unsigned long _index)
* *
* @param _index The index of the joint that is being deleted. * @param _index The index of the joint that is being deleted.
*/ */
template<typename Scalar> template<class PointT>
void InterpolationAnimationT<Scalar>::remove_at(unsigned long _index) void InterpolationAnimationT<PointT>::removeJointAt(unsigned int _index)
{ {
//NOOP //NOOP
} }
...@@ -233,16 +229,16 @@ void InterpolationAnimationT<Scalar>::remove_at(unsigned long _index) ...@@ -233,16 +229,16 @@ void InterpolationAnimationT<Scalar>::remove_at(unsigned long _index)
* *
* @param _index The joints index * @param _index The joints index
*/ */
template<typename Scalar> template<class PointT>
void InterpolationAnimationT<Scalar>::UpdateFromGlobal(unsigned long _index) void InterpolationAnimationT<PointT>::updateFromGlobal(unsigned int _index)
{ {
//NOOP //NOOP
} }
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
void InterpolationAnimationT<Scalar>::addInterpolator(InterpolationT<double> *_interpolator) { void InterpolationAnimationT<PointT>::addInterpolator(InterpolationT<double> *_interpolator) {
if (_interpolator == NULL) if (_interpolator == NULL)
return; return;
...@@ -271,9 +267,9 @@ void InterpolationAnimationT<Scalar>::addInterpolator(InterpolationT<double> *_i ...@@ -271,9 +267,9 @@ void InterpolationAnimationT<Scalar>::addInterpolator(InterpolationT<double> *_i
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
InterpolationT<Scalar>* InterpolationT<typename PointT::value_type>*
InterpolationAnimationT<Scalar>::interpolator(unsigned int _index) InterpolationAnimationT<PointT>::interpolator(unsigned int _index)
{ {
if ( _index < interpolators_.size() ) if ( _index < interpolators_.size() )
return interpolators_[ _index ]; return interpolators_[ _index ];
...@@ -283,8 +279,8 @@ InterpolationAnimationT<Scalar>::interpolator(unsigned int _index) ...@@ -283,8 +279,8 @@ InterpolationAnimationT<Scalar>::interpolator(unsigned int _index)
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
unsigned int InterpolationAnimationT<Scalar>::interpolatorCount() unsigned int InterpolationAnimationT<PointT>::interpolatorCount()
{ {
return interpolators_.size(); return interpolators_.size();
} }
...@@ -294,8 +290,8 @@ unsigned int InterpolationAnimationT<Scalar>::interpolatorCount() ...@@ -294,8 +290,8 @@ unsigned int InterpolationAnimationT<Scalar>::interpolatorCount()
/** /**
* \brief Calculates the last frame that interpolator _index is responsible for * \brief Calculates the last frame that interpolator _index is responsible for
*/ */
template<typename Scalar> template<class PointT>
unsigned long InterpolationAnimationT<Scalar>::calcAbsoluteMaxForInterpolator(uint _index) { unsigned int InterpolationAnimationT<PointT>::calcAbsoluteMaxForInterpolator(uint _index) {
assert (_index < interpolators_.size()); assert (_index < interpolators_.size());
if (_index == 0) { if (_index == 0) {
...@@ -307,8 +303,8 @@ unsigned long InterpolationAnimationT<Scalar>::calcAbsoluteMaxForInterpolator(ui ...@@ -307,8 +303,8 @@ unsigned long InterpolationAnimationT<Scalar>::calcAbsoluteMaxForInterpolator(ui
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
bool InterpolationAnimationT<Scalar>::getMinInput(Scalar& _result) { bool InterpolationAnimationT<PointT>::getMinInput(Scalar& _result) {
if (interpolators_.size() == 0) if (interpolators_.size() == 0)
return false; return false;
else else
...@@ -324,8 +320,8 @@ bool InterpolationAnimationT<Scalar>::getMinInput(Scalar& _result) { ...@@ -324,8 +320,8 @@ bool InterpolationAnimationT<Scalar>::getMinInput(Scalar& _result) {
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
bool InterpolationAnimationT<Scalar>::getMaxInput(Scalar& _result) { bool InterpolationAnimationT<PointT>::getMaxInput(Scalar& _result) {
if (interpolators_.size() == 0) if (interpolators_.size() == 0)
return false; return false;
else else
...@@ -341,8 +337,8 @@ bool InterpolationAnimationT<Scalar>::getMaxInput(Scalar& _result) { ...@@ -341,8 +337,8 @@ bool InterpolationAnimationT<Scalar>::getMaxInput(Scalar& _result) {
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
bool InterpolationAnimationT<Scalar>::isInfluenced(int _joint) { bool InterpolationAnimationT<PointT>::isInfluenced(int _joint) {
for (uint i=0; i<influencedJoints_.size(); ++i) for (uint i=0; i<influencedJoints_.size(); ++i)
if ( influencedJoints_[i] == _joint ) if ( influencedJoints_[i] == _joint )
return true; return true;
...@@ -352,8 +348,8 @@ bool InterpolationAnimationT<Scalar>::isInfluenced(int _joint) { ...@@ -352,8 +348,8 @@ bool InterpolationAnimationT<Scalar>::isInfluenced(int _joint) {
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
template<typename Scalar> template<class PointT>
std::vector<int>& InterpolationAnimationT<Scalar>::influencedJoints() { std::vector<int>& InterpolationAnimationT<PointT>::influencedJoints() {
return influencedJoints_; return influencedJoints_;
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include "InterpolationT.hh" #include "InterpolationT.hh"
#include "InterpolationMatrixManipulatorT.hh" #include "InterpolationMatrixManipulatorT.hh"
template<typename PointT> template<class PointT>
class InterpolationAnimationT : public AnimationT<PointT> class InterpolationAnimationT : public AnimationT<PointT>
{ {
template<typename> template<typename>
...@@ -77,54 +77,53 @@ class InterpolationAnimationT : public AnimationT<PointT> ...@@ -77,54 +77,53 @@ class InterpolationAnimationT : public AnimationT<PointT>
virtual bool getMaxInput(Scalar& _result); virtual bool getMaxInput(Scalar& _result);
protected: protected:
SkeletonHierarchyI *hierarchy_; ///< Stores a pointer to the skeleton hierarchy, is passed to new poses as they are created
Pose *reference_; ///< Stores the reference pose attached to the skeleton, the poses use it for some precalculations
Skeleton* skeleton_;
std::vector<int> influencedJoints_;
std::vector< Interpolator* > interpolators_; std::vector<int> influencedJoints_;
//Hier muss es einen Mapper geben, der weiß, wie er auf die Matrix aus der Pose die Werte, die der Interpolator std::vector< Interpolator* > interpolators_;
//erzeugt, anwendet. //Hier muss es einen Mapper geben, der weiß, wie er auf die Matrix aus der Pose die Werte, die der Interpolator
std::map < Interpolator*, std::vector < TargetType > > precalculations_; //erzeugt, anwendet.
MatrixManipulator* matrixManipulator_; std::map < Interpolator*, std::vector < TargetType > > precalculations_;
unsigned int frames_; MatrixManipulator* matrixManipulator_;
unsigned int frames_;
std::map < unsigned int, Pose* > interpolatedPoses_;
std::map < unsigned int, Pose* > interpolatedPoses_;
unsigned int calcAbsoluteMaxForInterpolator(uint _index);
unsigned int calcAbsoluteMaxForInterpolator(uint _index);
public: public:
static const int FPS = 60; static const int FPS = 60;
public: public:
/** /**
* @name Frame access * @name Frame access
* There is one pose per frame. * There is one pose per frame.
*/ */
//@{ //@{
virtual Pose *getPose(unsigned int _iFrame); virtual Pose* pose(unsigned int _iFrame);
virtual Pose *getPose(unsigned int _iFrame, Pose* _reference); virtual Pose* pose(unsigned int _iFrame, Pose* _reference);
inline unsigned int getFrameCount(); inline unsigned int frameCount();
//@} //@}
/** /**
* @name Synchronization * @name Synchronization
* Use these methods to keep the poses in sync with the number (and indices) of the joints. * Use these methods to keep the poses in sync with the number (and indices) of the joints.
*/