1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:49:56 +00:00
openmw-tes3mp/apps/openmw/mwworld/physicssystem.hpp

46 lines
1.5 KiB
C++
Raw Normal View History

2011-08-01 13:55:36 +00:00
#ifndef GAME_MWWORLD_PHYSICSSYSTEM_H
#define GAME_MWWORLD_PHYSICSSYSTEM_H
#include <vector>
#include <openengine/ogre/renderer.hpp>
#include <openengine/bullet/physic.hpp>
namespace MWWorld
{
class PhysicsSystem
{
public:
PhysicsSystem (OEngine::Render::OgreRenderer &_rend , OEngine::Physic::PhysicEngine* physEng);
~PhysicsSystem ();
std::vector< std::pair<const std::string*, Ogre::Vector3> > doPhysics (float duration,
2011-08-01 13:55:36 +00:00
const std::vector<std::pair<std::string, Ogre::Vector3> >& actors);
void addObject (const std::string& handle, const std::string& mesh,
const Ogre::Quaternion& rotation, float scale, const Ogre::Vector3& position);
void addActor (const std::string& handle, const std::string& mesh,
const Ogre::Vector3& position);
void removeObject (const std::string& handle);
void moveObject (const std::string& handle, const Ogre::Vector3& position, bool updatePhysics);
void rotateObject (const std::string& handle, const Ogre::Quaternion& rotation);
void scaleObject (const std::string& handle, float scale);
bool toggleCollisionMode();
private:
OEngine::Render::OgreRenderer &mRender;
OEngine::Physic::PhysicEngine* mEngine;
bool mFreeFly;
};
}
#endif