blob: 19894100d2b448892fb3ab3b43783cc4dbcb05f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
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 "core/cvar.h"
#include "model/collisionmesh.h"
#include "btBulletDynamicsCommon.h"
#include "BulletCollision/CollisionShapes/btTriangleMesh.h"
#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
#include "BulletCollision/Gimpact/btGImpactShape.h"
#include "BulletDynamics/Dynamics/btActionInterface.h"
namespace core
{
class Physics {
public:
static void init();
static void done();
static void frame(const unsigned long elapsed);
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;
};
} // namespace core
#endif // __INCLUDED_CORE_PHYSICS_H__
|