47 #include "../PoseT.hh" 48 #include "InterpolationT.hh" 49 #include "InterpolationMatrixManipulatorT.hh" 51 template<
class Po
intT>
59 typedef typename Point::value_type Scalar;
63 typedef std::vector<Scalar> TargetType;
74 virtual bool getMinInput(Scalar& _result);
75 virtual bool getMaxInput(Scalar& _result);
81 std::vector<int> influencedJoints_;
82 std::vector< Interpolator* > interpolators_;
85 std::map < Interpolator*, std::vector < TargetType > > precalculations_;
86 MatrixManipulator* matrixManipulator_;
89 std::map < unsigned int, Pose* > interpolatedPoses_;
94 static const int FPS = 60;
110 virtual Pose*
pose(
unsigned int _iFrame);
119 virtual Pose*
pose(
unsigned int _iFrame, Pose* _reference);
188 void addInfluencedJoint(
int _joint)
190 influencedJoints_.push_back(_joint);
193 bool isInfluenced(
int _joint);
195 std::vector<int>& influencedJoints();
213 Pose* getReference() {
return pose(0); }
215 virtual void clearPoseCache()
217 if (interpolatedPoses_.size() == 1 && interpolatedPoses_.find(0) != interpolatedPoses_.end())
220 if (interpolatedPoses_.find(0) != interpolatedPoses_.end()) {
223 if (interpolatedPoses_.size() > 1) {
224 typename std::map<unsigned int, Pose*>::iterator ip_it = interpolatedPoses_.begin();
226 for (; ip_it != interpolatedPoses_.end(); ++ip_it) {
227 delete ip_it->second;
228 interpolatedPoses_.erase(ip_it);
234 interpolatedPoses_.clear();
242 #if defined(INCLUDE_TEMPLATES) && !defined(INTERPOLATIONANIMATIONT_C) 243 #define INTERPOLATIONANIMATIONT_TEMPLATES 244 #include "InterpolationAnimationT_impl.hh" unsigned int frameCount()
Returns the number of frames stored in this pose.
unsigned int interpolatorCount()
Get the number of interpolators.
void addInterpolator(InterpolationT< double > *_interpolator)
Add an interpolator.
virtual Pose * pose(unsigned int _iFrame)
Returns a pointer to the pose calculated for the given frame.
A general pose, used to store the frames of the animation.
virtual void removeJointAt(unsigned int _index)
Called by the skeleton as a joint is deleted.
unsigned int calcAbsoluteMaxForInterpolator(uint _index)
Calculates the last frame that interpolator _index is responsible for.
Knows how to apply the values generated by an interpolator to a matrix. When playing back an Interpol...
MatrixManipulator * matrixManipulator()
Get the matrix manipulator.
Interpolator * interpolator(unsigned int _index)
Get the i-th interpolator.
virtual void updateFromGlobal(unsigned int _index)
Updates the local matrix using the global matrix.
virtual void insertJointAt(unsigned int _index)
Called by the skeleton as a new joint is inserted.
Stores a single animation.
InterpolationAnimationT(const InterpolationAnimationT< PointT > &_other)
Copy constructor.