#pragma once #include #include #include #include "LinearMath/btVector3.h" #include "btBulletDynamicsCommon.h" #include namespace RNR { class World; class ComPlicitNgine { std::thread m_physicsThread; Ogre::Timer* m_physicsTimer; float m_lastPhysicsDelta; float m_physicsTime; btDiscreteDynamicsWorld* m_dynamicsWorld; World* m_world; std::map m_physicsParts; void thread(); public: ComPlicitNgine(World* world); ~ComPlicitNgine(); void updateTree(); void updateTreeRender(); Ogre::Timer* getPhysicsTimer() { return m_physicsTimer; } float getLastPhysicsDelta() { return m_lastPhysicsDelta; } float getPhysicsTime() { return m_physicsTime; } btRigidBody* getBody(PartInstance* part) { return m_physicsParts[part]; }; void registerPhysicsPart(PartInstance* partRegistered); void deletePhysicsPart(PartInstance* partDelete); }; }