diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-17 17:19:03 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-17 17:19:03 +0000 |
commit | d6e4c4e7c2b1e28961f1dfe2f25ef96ced60b21b (patch) | |
tree | 63744dff093a8b23f65d9c68b922b678805647d9 /src/core/physics.h | |
parent | ea6e6bb769d713ac55114c1940626f13e384ebed (diff) |
core bullet physics support,
initial vstrafe support
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__ + |