OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
objects.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWMECHANICS_ACTIVATORS_H
2 #define GAME_MWMECHANICS_ACTIVATORS_H
3 
4 #include <string>
5 #include <map>
6 
7 #include "character.hpp"
8 
9 namespace MWWorld
10 {
11  class Ptr;
12  class CellStore;
13 }
14 
15 namespace MWMechanics
16 {
17  class Objects
18  {
19  typedef std::map<MWWorld::Ptr,CharacterController*> PtrControllerMap;
21 
22  public:
23  Objects();
24  ~Objects();
25 
26  void addObject (const MWWorld::Ptr& ptr);
28 
29  void removeObject (const MWWorld::Ptr& ptr);
31 
32  void updateObject(const MWWorld::Ptr &old, const MWWorld::Ptr& ptr);
34 
35  void dropObjects(const MWWorld::CellStore *cellStore);
37 
38  void update(float duration, bool paused);
40 
41  bool playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number, bool persist=false);
42  void skipAnimation(const MWWorld::Ptr& ptr);
44 
45  void getObjectsInRange (const osg::Vec3f& position, float radius, std::vector<MWWorld::Ptr>& out);
46  };
47 }
48 
49 #endif
void removeObject(const MWWorld::Ptr &ptr)
Deregister an object.
Definition: objects.cpp:35
void update(float duration, bool paused)
Update object animations.
Definition: objects.cpp:73
~Objects()
Definition: objects.cpp:17
void persistAnimationStates()
Definition: objects.cpp:102
void dropObjects(const MWWorld::CellStore *cellStore)
Deregister all objects in the given cell.
Definition: objects.cpp:58
void addObject(const MWWorld::Ptr &ptr)
Register an animated object.
Definition: objects.cpp:27
Definition: objects.hpp:17
void skipAnimation(const MWWorld::Ptr &ptr)
Definition: objects.cpp:95
Mutable state of a cell.
Definition: cellstore.hpp:53
void updateObject(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)
Updates an object with a new Ptr.
Definition: objects.cpp:45
PtrControllerMap mObjects
Definition: objects.hpp:20
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
bool playAnimationGroup(const MWWorld::Ptr &ptr, const std::string &groupName, int mode, int number, bool persist=false)
Definition: objects.cpp:82
std::map< MWWorld::Ptr, CharacterController * > PtrControllerMap
Definition: objects.hpp:19
void getObjectsInRange(const osg::Vec3f &position, float radius, std::vector< MWWorld::Ptr > &out)
Definition: objects.cpp:108
Objects()
Definition: objects.cpp:13