diff options
Diffstat (limited to 'src/core/physics.h')
-rw-r--r-- | src/core/physics.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/core/physics.h b/src/core/physics.h new file mode 100644 index 0000000..e565403 --- /dev/null +++ b/src/core/physics.h @@ -0,0 +1,53 @@ +/* + core/physics.h + This file is part of the Osirion project and is distributed under + the terms and conditions of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_CORE_PHYSICS_H__ +#define __INCLUDED_CORE_PHYSICS_H__ + +#include "sys/sys.h" +#include "math/vector3f.h" +#include "math/axis.h" + +#include "btBulletDynamicsCommon.h" +#include "BulletCollision/CollisionShapes/btTriangleMesh.h" +#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" +#include "BulletCollision/Gimpact/btGImpactShape.h" + +namespace core +{ + +class Physics { +public: + static void init(); + + static void done(); + + static void frame(const unsigned long timestamp); + + inline static btDefaultCollisionConfiguration *configuration() { + return physics_configuration; + } + + inline static btCollisionDispatcher *dispatcher() { + return physics_dispatcher; + } + + inline static btSequentialImpulseConstraintSolver *solver() { + return physics_solver; + } + +private: + static btDefaultCollisionConfiguration *physics_configuration; + static btCollisionDispatcher *physics_dispatcher; + static btSequentialImpulseConstraintSolver *physics_solver; + + static unsigned long physics_timestamp; +}; + +} // namespace core + +#endif // __INCLUDED_CORE_PHYSICS_H__ + |