9 using namespace vrecko;
11 namespace APObjectUtils
15 #ifndef ANIMATOR_IMP_EXP
16 #ifdef AP_OBJECTUTILS_EXPORTS
17 #define ANIMATOR_IMP_EXP __declspec(dllexport)
19 #define ANIMATOR_IMP_EXP __declspec(dllimport)
70 virtual void preInitialize();
71 virtual bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode *pParametersNode);
72 virtual void update();
76 bool removeAnimation();
81 bool startAnimation();
83 bool animateToPoint(
int pointIndex);
88 bool resetToPos(
float fPos);
91 bool setAnimationPointsNumber(
unsigned int number);
94 bool setEnabledAnimations(
unsigned long dwAnimations);
99 bool setTranslation(
int pointIndex,
const osg::Vec3 &trans);
100 osg::Vec3 &getTranslation(
int pointIndex);
102 bool setRotation(
int pointIndex,
const osg::Quat &rot);
103 inline osg::Quat &getRotation(
int pointIndex);
105 bool setScale(
int pointIndex,
const osg::Vec3 &scale);
106 osg::Vec3 &getScale(
int pointIndex);
108 bool setAlpha(
int pointIndex,
float alpha);
109 float getAlpha(
int pointIndex);
123 bool setTransformationFromMatrix(
int startPointIndex,
int endPointIndex,
const osg::Matrix &matrix);
128 bool getAnimMatrix(
float fActPos, osg::Matrix &outMatrix);
159 float convertActTimeToActPos();
162 float convertActPosToNormPos(
float fActPos,
int *outPoint1,
int *outPoint2);
166 bool updateActTime();
167 bool updateAnimation(
float fActPos);
169 bool calcAnimMatrix(
float fNormPos,
int iPoint1,
int iPoint2, osg::Matrix &outMatrix);