OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
animation.hpp
Go to the documentation of this file.
1 #ifndef GAME_RENDER_ANIMATION_H
2 #define GAME_RENDER_ANIMATION_H
3 
4 #include "../mwworld/ptr.hpp"
5 
7 
8 namespace ESM
9 {
10  struct Light;
11  struct MagicEffect;
12 }
13 
14 namespace Resource
15 {
16  class ResourceSystem;
17 }
18 
19 namespace NifOsg
20 {
21  class KeyframeHolder;
22  class KeyframeController;
23 }
24 
25 namespace SceneUtil
26 {
27  class LightSource;
28  class LightListCallback;
29  class Skeleton;
30 }
31 
32 namespace MWRender
33 {
34 
35 class ResetAccumRootCallback;
36 class RotateController;
37 class GlowUpdater;
38 
40 {
41 private:
42  float mTime;
43 public:
44  virtual float getValue(osg::NodeVisitor* nv);
45 
46  void addTime(float duration);
47  void resetTime(float time);
48  float getTime() const;
49 
51 };
52 
55 {
56 public:
57  PartHolder(osg::ref_ptr<osg::Node> node);
58 
59  ~PartHolder();
60 
61  osg::ref_ptr<osg::Node> getNode()
62  {
63  return mNode;
64  }
65 
66 private:
67  osg::ref_ptr<osg::Node> mNode;
68 
69  void operator= (const PartHolder&);
70  PartHolder(const PartHolder&);
71 };
72 typedef std::shared_ptr<PartHolder> PartHolderPtr;
73 
75 {
76  std::string mModelName; // Just here so we don't add the same effect twice
78  std::shared_ptr<EffectAnimationTime> mAnimTime;
80  int mEffectId;
81  bool mLoop;
82  std::string mBoneName;
83 };
84 
85 class Animation : public osg::Referenced
86 {
87 public:
88  enum BoneGroup {
93  };
94 
95  enum BlendMask {
100 
102 
104  };
105  /* This is the number of *discrete* blend masks. */
106  static const size_t sNumBlendMasks = 4;
107 
110  {
112  AnimPriority(int priority)
113  {
114  for (unsigned int i=0; i<sNumBlendMasks; ++i)
115  mPriority[i] = priority;
116  }
117 
118  bool operator == (const AnimPriority& other) const
119  {
120  for (unsigned int i=0; i<sNumBlendMasks; ++i)
121  if (other.mPriority[i] != mPriority[i])
122  return false;
123  return true;
124  }
125 
127  {
128  return mPriority[n];
129  }
130 
131  const int& operator[] (BoneGroup n) const
132  {
133  return mPriority[n];
134  }
135 
136  bool contains(int priority) const
137  {
138  for (unsigned int i=0; i<sNumBlendMasks; ++i)
139  if (priority == mPriority[i])
140  return true;
141  return false;
142  }
143 
145  };
146 
148  {
149  public:
150  virtual void handleTextKey(const std::string &groupname, const std::multimap<float, std::string>::const_iterator &key,
151  const std::multimap<float, std::string>& map) = 0;
152  };
153 
154  void setTextKeyListener(TextKeyListener* listener);
155 
156 protected:
158  {
159  private:
160  std::shared_ptr<float> mTimePtr;
161 
162  public:
163 
164  void setTimePtr(std::shared_ptr<float> time)
165  { mTimePtr = time; }
166  std::shared_ptr<float> getTimePtr() const
167  { return mTimePtr; }
168 
169  virtual float getValue(osg::NodeVisitor* nv);
170  };
171 
173  {
174  public:
175  virtual float getValue(osg::NodeVisitor *nv)
176  {
177  return 0.f;
178  }
179  };
180 
181  struct AnimSource;
182 
183  struct AnimState {
184  std::shared_ptr<AnimSource> mSource;
185  float mStartTime;
188  float mStopTime;
189 
190  typedef std::shared_ptr<float> TimePtr;
192  float mSpeedMult;
193 
194  bool mPlaying;
196  size_t mLoopCount;
197 
201 
203  mTime(new float), mSpeedMult(1.0f), mPlaying(false), mLoopingEnabled(true),
204  mLoopCount(0), mPriority(0), mBlendMask(0), mAutoDisable(true)
205  {
206  }
207  ~AnimState();
208 
209  float getTime() const
210  {
211  return *mTime;
212  }
213  void setTime(float time)
214  {
215  *mTime = time;
216  }
217 
218  bool shouldLoop() const
219  {
220  return getTime() >= mLoopStopTime && mLoopingEnabled && mLoopCount > 0;
221  }
222  };
223  typedef std::map<std::string,AnimState> AnimStateMap;
225 
226  typedef std::vector<std::shared_ptr<AnimSource> > AnimSourceList;
228 
229  osg::ref_ptr<osg::Group> mInsert;
230 
231  osg::ref_ptr<osg::Group> mObjectRoot;
233 
234  // The node expected to accumulate movement during movement animations.
235  osg::ref_ptr<osg::Node> mAccumRoot;
236 
237  // The controller animating that node.
238  osg::ref_ptr<NifOsg::KeyframeController> mAccumCtrl;
239 
240  // Used to reset the position of the accumulation root every frame - the movement should be applied to the physics system
241  osg::ref_ptr<ResetAccumRootCallback> mResetAccumRootCallback;
242 
243  // Keep track of controllers that we added to our scene graph.
244  // We may need to rebuild these controllers when the active animation groups / sources change.
245  typedef std::multimap<osg::ref_ptr<osg::Node>, osg::ref_ptr<osg::NodeCallback> > ControllerMap;
247 
248  std::shared_ptr<AnimationTime> mAnimationTimePtr[sNumBlendMasks];
249 
250  // Stored in all lowercase for a case-insensitive lookup
251  typedef std::map<std::string, osg::ref_ptr<osg::MatrixTransform> > NodeMap;
252  mutable NodeMap mNodeMap;
253  mutable bool mNodeMapCreated;
254 
256 
258 
259  osg::Vec3f mAccumulate;
260 
262 
263  osg::ref_ptr<RotateController> mHeadController;
267 
268  osg::ref_ptr<SceneUtil::LightSource> mGlowLight;
269  osg::ref_ptr<GlowUpdater> mGlowUpdater;
270 
271  float mAlpha;
272 
273  mutable std::map<std::string, float> mAnimVelocities;
274 
275  osg::ref_ptr<SceneUtil::LightListCallback> mLightListCallback;
276 
278 
279  const NodeMap& getNodeMap() const;
280 
281  /* Sets the appropriate animations on the bone groups based on priority.
282  */
283  void resetActiveGroups();
284 
285  size_t detectBlendMask(const osg::Node* node) const;
286 
287  /* Updates the position of the accum root node for the given time, and
288  * returns the wanted movement vector from the previous time. */
289  void updatePosition(float oldtime, float newtime, osg::Vec3f& position);
290 
291  /* Resets the animation to the time of the specified start marker, without
292  * moving anything, and set the end time to the specified stop marker. If
293  * the marker is not found, or if the markers are the same, it returns
294  * false.
295  */
296  bool reset(AnimState &state, const std::multimap<float, std::string> &keys,
297  const std::string &groupname, const std::string &start, const std::string &stop,
298  float startpoint, bool loopfallback);
299 
300  void handleTextKey(AnimState &state, const std::string &groupname, const std::multimap<float, std::string>::const_iterator &key,
301  const std::multimap<float, std::string>& map);
302 
311  void setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature);
312 
313  void loadAllAnimationsInFolder(const std::string &model, const std::string &baseModel);
314 
320  void addAnimSource(const std::string &model, const std::string& baseModel);
321  void addSingleAnimSource(const std::string &model, const std::string& baseModel);
322 
324  void addExtraLight(osg::ref_ptr<osg::Group> parent, const ESM::Light *light);
325 
326  void clearAnimSources();
327 
332  virtual void addControllers();
333 
334  osg::Vec4f getEnchantmentColor(const MWWorld::ConstPtr& item) const;
335 
336  void addGlow(osg::ref_ptr<osg::Node> node, osg::Vec4f glowColor, float glowDuration = -1);
337 
339  virtual void setRenderBin();
340 
341 public:
342 
343  Animation(const MWWorld::Ptr &ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem);
344 
346  virtual ~Animation();
347 
348  MWWorld::ConstPtr getPtr() const;
349 
351 
355  void setActive(int active);
356 
357  osg::Group* getOrCreateObjectRoot();
358 
359  osg::Group* getObjectRoot();
360 
371  void addEffect (const std::string& model, int effectId, bool loop = false, const std::string& bonename = "", const std::string& texture = "", float scale = 1.0f);
372  void removeEffect (int effectId);
373  void getLoopingEffects (std::vector<int>& out) const;
374 
375  // Add a spell casting glow to an object. From measuring video taken from the original engine,
376  // the glow seems to be about 1.5 seconds except for telekinesis, which is 1 second.
377  void addSpellCastGlow(const ESM::MagicEffect *effect, float glowDuration = 1.5);
378 
379  virtual void updatePtr(const MWWorld::Ptr &ptr);
380 
381  bool hasAnimation(const std::string &anim) const;
382 
383  // Specifies the axis' to accumulate on. Non-accumulated axis will just
384  // move visually, but not affect the actual movement. Each x/y/z value
385  // should be on the scale of 0 to 1.
386  void setAccumulation(const osg::Vec3f& accum);
387 
408  void play(const std::string &groupname, const AnimPriority& priority, int blendMask, bool autodisable,
409  float speedmult, const std::string &start, const std::string &stop,
410  float startpoint, size_t loops, bool loopfallback=false);
411 
414  void adjustSpeedMult (const std::string& groupname, float speedmult);
415 
417  bool isPlaying(const std::string &groupname) const;
418 
420  bool upperBodyReady() const;
421 
428  bool getInfo(const std::string &groupname, float *complete=NULL, float *speedmult=NULL) const;
429 
431  float getStartTime(const std::string &groupname) const;
432 
434  float getTextKeyTime(const std::string &textKey) const;
435 
437  float getCurrentTime(const std::string& groupname) const;
438 
439  size_t getCurrentLoopCount(const std::string& groupname) const;
440 
444  void disable(const std::string &groupname);
445 
447  float getVelocity(const std::string &groupname) const;
448 
449  virtual osg::Vec3f runAnimation(float duration);
450 
451  void setLoopingEnabled(const std::string &groupname, bool enabled);
452 
454  void updateEffects();
455 
458  const osg::Node* getNode(const std::string& name) const;
459 
460  virtual void showWeapons(bool showWeapon) {}
461  virtual void showCarriedLeft(bool show) {}
462  virtual void setWeaponGroup(const std::string& group) {}
463  virtual void setVampire(bool vampire) {}
465  void setAlpha(float alpha);
466  virtual void setPitchFactor(float factor) {}
467  virtual void attachArrow() {}
468  virtual void releaseArrow(float attackStrength) {}
469  virtual void enableHeadAnimation(bool enable) {}
470  // TODO: move outside of this class
473  virtual void setLightEffect(float effect);
474 
475  virtual void setHeadPitch(float pitchRadians);
476  virtual void setHeadYaw(float yawRadians);
477  virtual float getHeadPitch() const;
478  virtual float getHeadYaw() const;
479  virtual void setAccurateAiming(bool enabled) {}
480 
481 private:
482  Animation(const Animation&);
483  void operator=(Animation&);
484 };
485 
486 class ObjectAnimation : public Animation {
487 public:
488  ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model, Resource::ResourceSystem* resourceSystem, bool animated, bool allowLight);
489 };
490 
491 class UpdateVfxCallback : public osg::NodeCallback
492 {
493 public:
495  : mFinished(false)
496  , mParams(params)
497  , mStartingTime(0)
498  {
499  }
500 
501  bool mFinished;
503 
504  virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
505 
506 private:
508 };
509 
510 }
511 #endif
int mPriority[sNumBlendMasks]
Definition: animation.hpp:144
void adjustSpeedMult(const std::string &groupname, float speedmult)
Definition: animation.cpp:1089
AnimSourceList mAnimSources
Definition: animation.hpp:227
std::shared_ptr< AnimationTime > mAnimationTimePtr[sNumBlendMasks]
Definition: animation.hpp:248
Animation(const MWWorld::Ptr &ptr, osg::ref_ptr< osg::Group > parentNode, Resource::ResourceSystem *resourceSystem)
Definition: animation.cpp:584
float mStartTime
Definition: animation.hpp:185
osg::ref_ptr< osg::Group > mObjectRoot
Definition: animation.hpp:231
AnimState()
Definition: animation.hpp:202
osg::Group * getObjectRoot()
Definition: animation.cpp:1421
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:30
bool getInfo(const std::string &groupname, float *complete=NULL, float *speedmult=NULL) const
Definition: animation.cpp:1104
virtual void showWeapons(bool showWeapon)
Definition: animation.hpp:460
Handles the bone matrices for any number of child RigGeometries.
Definition: skeleton.hpp:36
void loadAllAnimationsInFolder(const std::string &model, const std::string &baseModel)
Definition: animation.cpp:673
void setActive(int active)
Definition: animation.cpp:623
void setAlpha(float alpha)
A value < 1 makes the animation translucent, 1.f = fully opaque.
Definition: animation.cpp:1687
Definition: animation.hpp:85
Detaches the node from its parent when the object goes out of scope.
Definition: animation.hpp:54
void addSingleAnimSource(const std::string &model, const std::string &baseModel)
Definition: animation.cpp:718
osg::ref_ptr< osg::Node > mNode
Definition: animation.hpp:67
static const size_t sNumBlendMasks
Definition: animation.hpp:106
bool isPlaying(const std::string &groupname) const
Definition: animation.cpp:1096
Definition: animation.hpp:103
virtual float getHeadYaw() const
Definition: animation.cpp:1821
void addExtraLight(osg::ref_ptr< osg::Group > parent, const ESM::Light *light)
Definition: animation.cpp:1545
virtual float getValue(osg::NodeVisitor *nv)
Definition: animation.cpp:1835
virtual void setWeaponGroup(const std::string &group)
Definition: animation.hpp:462
bool mHasMagicEffects
Definition: animation.hpp:266
int & operator[](BoneGroup n)
Definition: animation.hpp:126
float getTextKeyTime(const std::string &textKey) const
Get the absolute position in the animation track of the text key.
Definition: animation.cpp:810
virtual void setHeadPitch(float pitchRadians)
Definition: animation.cpp:1806
EffectParams mParams
Definition: animation.hpp:502
float mTime
Definition: animation.hpp:42
bool contains(int priority) const
Definition: animation.hpp:136
void addTime(float duration)
Definition: animation.cpp:1840
virtual void setHeadYaw(float yawRadians)
Definition: animation.cpp:1811
float mMaxControllerLength
Definition: animation.hpp:79
void disable(const std::string &groupname)
Definition: animation.cpp:1144
Definition: animation.hpp:183
void setTextKeyListener(TextKeyListener *listener)
Definition: animation.cpp:1010
void addGlow(osg::ref_ptr< osg::Node > node, osg::Vec4f glowColor, float glowDuration=-1)
Definition: animation.cpp:1477
void addEffect(const std::string &model, int effectId, bool loop=false, const std::string &bonename="", const std::string &texture="", float scale=1.0f)
Add an effect mesh attached to a bone or the insert scene node.
Definition: animation.cpp:1561
Definition: animation.hpp:172
std::shared_ptr< float > TimePtr
Definition: animation.hpp:190
void clearAnimSources()
Definition: animation.cpp:770
osg::ref_ptr< SceneUtil::LightListCallback > mLightListCallback
Definition: animation.hpp:275
bool mUseAdditionalSources
Definition: animation.hpp:277
Definition: animation.hpp:92
Definition: animation.hpp:90
osg::ref_ptr< NifOsg::KeyframeController > mAccumCtrl
Definition: animation.hpp:238
virtual float getValue(osg::NodeVisitor *nv)
Definition: animation.hpp:175
double mStartingTime
Definition: animation.hpp:507
int mBlendMask
Definition: animation.hpp:199
void addAnimSource(const std::string &model, const std::string &baseModel)
Definition: animation.cpp:702
void addSpellCastGlow(const ESM::MagicEffect *effect, float glowDuration=1.5)
Definition: animation.cpp:1455
void resetActiveGroups()
Definition: animation.cpp:1026
Definition: animation.hpp:98
Definition: nifloader.hpp:40
float mLoopStartTime
Definition: animation.hpp:186
NodeMap mNodeMap
Definition: animation.hpp:252
void setTime(float time)
Definition: animation.hpp:213
virtual void handleTextKey(const std::string &groupname, const std::multimap< float, std::string >::const_iterator &key, const std::multimap< float, std::string > &map)=0
std::shared_ptr< PartHolder > PartHolderPtr
Definition: animation.hpp:72
std::shared_ptr< float > mTimePtr
Definition: animation.hpp:160
bool mNodeMapCreated
Definition: animation.hpp:253
std::multimap< osg::ref_ptr< osg::Node >, osg::ref_ptr< osg::NodeCallback > > ControllerMap
Definition: animation.hpp:245
void handleTextKey(AnimState &state, const std::string &groupname, const std::multimap< float, std::string >::const_iterator &key, const std::multimap< float, std::string > &map)
Definition: animation.cpp:826
osg::ref_ptr< osg::Node > mAccumRoot
Definition: animation.hpp:235
osg::Vec3f mAccumulate
Definition: animation.hpp:259
MWWorld::Ptr mPtr
Definition: animation.hpp:255
float mSpeedMult
Definition: animation.hpp:192
EffectAnimationTime()
Definition: animation.hpp:50
virtual void updatePtr(const MWWorld::Ptr &ptr)
Definition: animation.cpp:629
float mAlpha
Definition: animation.hpp:271
virtual void attachArrow()
Definition: animation.hpp:467
std::vector< std::shared_ptr< AnimSource > > AnimSourceList
Definition: animation.hpp:226
Definition: animation.hpp:74
std::map< std::string, float > mAnimVelocities
Definition: animation.hpp:273
void removeEffect(int effectId)
Definition: animation.cpp:1624
AnimStateMap mStates
Definition: animation.hpp:224
PartHolder(osg::ref_ptr< osg::Node > node)
Definition: animation.cpp:1887
const NodeMap & getNodeMap() const
Definition: animation.cpp:1015
int mEffectId
Definition: animation.hpp:80
osg::ref_ptr< RotateController > mHeadController
Definition: animation.hpp:263
float mHeadPitchRadians
Definition: animation.hpp:265
virtual void setAccurateAiming(bool enabled)
Definition: animation.hpp:479
float mLoopStopTime
Definition: animation.hpp:187
TextKeyListener * mTextKeyListener
Definition: animation.hpp:261
void setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
Definition: animation.cpp:1357
bool reset(AnimState &state, const std::multimap< float, std::string > &keys, const std::string &groupname, const std::string &start, const std::string &stop, float startpoint, bool loopfallback)
Definition: animation.cpp:935
Definition: controller.hpp:186
osg::ref_ptr< osg::Group > mInsert
Definition: animation.hpp:229
bool mAutoDisable
Definition: animation.hpp:200
virtual float getHeadPitch() const
Definition: animation.cpp:1816
osg::Vec4f getEnchantmentColor(const MWWorld::ConstPtr &item) const
Definition: animation.cpp:1521
size_t detectBlendMask(const osg::Node *node) const
Definition: animation.cpp:642
bool operator==(const AnimPriority &other) const
Definition: animation.hpp:118
Definition: animation.hpp:486
osg::ref_ptr< GlowUpdater > mGlowUpdater
Definition: animation.hpp:269
~AnimState()
Definition: animation.cpp:1880
virtual void enableHeadAnimation(bool enable)
Definition: animation.hpp:469
bool mLoop
Definition: animation.hpp:81
BlendMask
Definition: animation.hpp:95
virtual void setRenderBin()
Set the render bin for this animation's object root. May be customized by subclasses.
Definition: animation.cpp:1721
bool upperBodyReady() const
Returns true if no important animations are currently playing on the upper body.
Definition: animation.cpp:1664
bool mLoopingEnabled
Definition: animation.hpp:195
virtual void showCarriedLeft(bool show)
Definition: animation.hpp:461
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
Definition: loadmgef.hpp:13
Definition: animation.hpp:96
void operator=(Animation &)
size_t mLoopCount
Definition: animation.hpp:196
~PartHolder()
Definition: animation.cpp:1892
float getTime() const
Definition: animation.hpp:209
void setTimePtr(std::shared_ptr< float > time)
Definition: animation.hpp:164
Definition: animation.hpp:97
AnimPriority mPriority
Definition: animation.hpp:198
float mHeadYawRadians
Definition: animation.hpp:264
virtual void setVampire(bool vampire)
Definition: animation.hpp:463
size_t getCurrentLoopCount(const std::string &groupname) const
Definition: animation.cpp:1135
virtual osg::Vec3f runAnimation(float duration)
Definition: animation.cpp:1220
osg::ref_ptr< osg::Node > getNode()
Definition: animation.hpp:61
BoneGroup
Definition: animation.hpp:88
void setLoopingEnabled(const std::string &groupname, bool enabled)
Definition: animation.cpp:1324
bool hasAnimation(const std::string &anim) const
Definition: animation.cpp:784
float mStopTime
Definition: animation.hpp:188
std::shared_ptr< AnimSource > mSource
Definition: animation.hpp:184
osg::ref_ptr< SceneUtil::LightSource > mGlowLight
Definition: animation.hpp:268
Definition: animation.hpp:491
osg::ref_ptr< ResetAccumRootCallback > mResetAccumRootCallback
Definition: animation.hpp:241
void play(const std::string &groupname, const AnimPriority &priority, int blendMask, bool autodisable, float speedmult, const std::string &start, const std::string &stop, float startpoint, size_t loops, bool loopfallback=false)
Definition: animation.cpp:856
virtual void addControllers()
Definition: animation.cpp:1773
Definition: animation.hpp:99
ObjectAnimation(const MWWorld::Ptr &ptr, const std::string &model, Resource::ResourceSystem *resourceSystem, bool animated, bool allowLight)
Definition: animation.cpp:1857
Definition: animation.hpp:101
SceneUtil::Skeleton * mSkeleton
Definition: animation.hpp:232
virtual float getValue(osg::NodeVisitor *nv)
Definition: animation.cpp:1828
Definition: animation.hpp:147
virtual void releaseArrow(float attackStrength)
Definition: animation.hpp:468
UpdateVfxCallback(EffectParams &params)
Definition: animation.hpp:494
bool shouldLoop() const
Definition: animation.hpp:218
osg::Group * getOrCreateObjectRoot()
Definition: animation.cpp:1426
void operator=(const PartHolder &)
Definition: animation.hpp:39
Definition: animation.hpp:89
std::shared_ptr< EffectAnimationTime > mAnimTime
Definition: animation.hpp:78
std::string mBoneName
Definition: animation.hpp:82
bool mFinished
Definition: animation.hpp:501
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
std::shared_ptr< float > getTimePtr() const
Definition: animation.hpp:166
float getCurrentTime(const std::string &groupname) const
Get the current absolute position in the animation track for the animation that is currently playing ...
Definition: animation.cpp:1126
Holds an animation priority value for each BoneGroup.
Definition: animation.hpp:109
void resetTime(float time)
Definition: animation.cpp:1845
Definition: controller.hpp:10
std::map< std::string, AnimState > AnimStateMap
Definition: animation.hpp:223
const osg::Node * getNode(const std::string &name) const
Definition: animation.cpp:1677
void enable(CodeContainer &code, Literals &literals, const std::string &id)
Definition: generator.cpp:870
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
Definition: animation.cpp:520
std::map< std::string, osg::ref_ptr< osg::MatrixTransform > > NodeMap
Definition: animation.hpp:251
void updateEffects()
This is typically called as part of runAnimation, but may be called manually if needed.
Definition: animation.cpp:1649
float getTime() const
Definition: animation.cpp:1850
Definition: loadligh.hpp:17
float getVelocity(const std::string &groupname) const
Definition: animation.cpp:1152
bool mPlaying
Definition: animation.hpp:194
virtual void setLightEffect(float effect)
Definition: animation.cpp:1733
Resource::ResourceSystem * mResourceSystem
Definition: animation.hpp:257
MWWorld::ConstPtr getPtr() const
Definition: animation.cpp:613
Definition: animation.hpp:91
Definition: animation.hpp:157
ControllerMap mActiveControllers
Definition: animation.hpp:246
float getStartTime(const std::string &groupname) const
Get the absolute position in the animation track of the first text key with the given group...
Definition: animation.cpp:797
PartHolderPtr mObjects
Definition: animation.hpp:77
TimePtr mTime
Definition: animation.hpp:191
void getLoopingEffects(std::vector< int > &out) const
Definition: animation.cpp:1632
AnimPriority(int priority)
Convenience constructor, initialises all priorities to the same value.
Definition: animation.hpp:112
virtual ~Animation()
Must be thread safe.
Definition: animation.cpp:605
std::string mModelName
Definition: animation.hpp:76
const char * name
Definition: crashcatcher.cpp:67
void setAccumulation(const osg::Vec3f &accum)
Definition: animation.cpp:634
virtual void setPitchFactor(float factor)
Definition: animation.hpp:466
void updatePosition(float oldtime, float newtime, osg::Vec3f &position)
Definition: animation.cpp:1213