1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 10:49:57 +00:00
openmw-tes3mp/apps/opencs/view/world/physicssystem.hpp

66 lines
1.8 KiB
C++

#ifndef CSV_WORLD_PHYSICSSYSTEM_H
#define CSV_WORLD_PHYSICSSYSTEM_H
#include <string>
#include <map>
#include <vector>
namespace Ogre
{
class Vector3;
class Quaternion;
class SceneManager;
class Camera;
}
namespace OEngine
{
namespace Physic
{
class PhysicEngine;
}
}
namespace CSVWorld
{
class PhysicsSystem
{
static PhysicsSystem *mPhysicsSystemInstance;
std::map<std::string, std::string> mRefToSceneNode;
OEngine::Physic::PhysicEngine* mEngine;
Ogre::SceneManager *mSceneMgr;
std::map<std::string, std::vector<std::string> > mSelectedEntities;
public:
PhysicsSystem(Ogre::SceneManager *sceneMgr = NULL);
~PhysicsSystem();
static PhysicsSystem *instance();
void setSceneManager(Ogre::SceneManager *sceneMgr);
void addObject(const std::string &mesh,
const std::string &name,
const std::string &referenceId,
float scale,
const Ogre::Vector3 &position,
const Ogre::Quaternion &rotation,
bool placeable=false);
void removeObject(const std::string &name);
void addHeightField(float* heights, int x, int y, float yoffset,
float triSize, float sqrtVerts);
void removeHeightField(int x, int y);
void toggleDebugRendering();
std::pair<bool, std::string> castRay(float mouseX, float mouseY,
Ogre::Vector3* normal, std::string* hit,
Ogre::Camera *camera, bool ignoreHeightMap);
};
}
#endif // CSV_WORLD_PHYSICSSYSTEM_H