1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 16:49:55 +00:00
openmw-tes3mp/apps/openmw/mwmechanics/objects.hpp

64 lines
1.5 KiB
C++
Raw Normal View History

#ifndef GAME_MWMECHANICS_ACTIVATORS_H
2013-04-01 15:30:54 +00:00
#define GAME_MWMECHANICS_ACTIVATORS_H
#include <string>
#include <map>
2019-02-18 22:10:55 +00:00
#include <vector>
2019-02-18 22:10:55 +00:00
namespace osg
{
class Vec3f;
}
namespace MWWorld
{
class Ptr;
class CellStore;
}
namespace MWMechanics
{
2019-02-18 22:10:55 +00:00
class CharacterController;
class Objects
{
typedef std::map<MWWorld::Ptr,CharacterController*> PtrControllerMap;
PtrControllerMap mObjects;
public:
Objects();
~Objects();
void addObject (const MWWorld::Ptr& ptr);
///< Register an animated object
void removeObject (const MWWorld::Ptr& ptr);
///< Deregister an object
void updateObject(const MWWorld::Ptr &old, const MWWorld::Ptr& ptr);
///< Updates an object with a new Ptr
void dropObjects(const MWWorld::CellStore *cellStore);
///< Deregister all objects in the given cell.
void update(float duration, bool paused);
///< Update object animations
bool onOpen(const MWWorld::Ptr& ptr);
void onClose(const MWWorld::Ptr& ptr);
bool playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number, bool persist=false);
void skipAnimation(const MWWorld::Ptr& ptr);
void persistAnimationStates();
2014-01-20 12:00:43 +00:00
2015-06-01 19:41:13 +00:00
void getObjectsInRange (const osg::Vec3f& position, float radius, std::vector<MWWorld::Ptr>& out);
std::size_t size() const
{
return mObjects.size();
}
};
}
#endif