-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPhysics.h
More file actions
45 lines (35 loc) · 1.11 KB
/
Physics.h
File metadata and controls
45 lines (35 loc) · 1.11 KB
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
//
// Created by madara on 11/12/16.
//
#ifndef MODELLOADING_PHYSICS_H
#define MODELLOADING_PHYSICS_H
#include "Includes.h"
#include "Model.h"
struct PhysicsObject {
bool dynamic;
////////////DynamicShape Params/////////////////
btConvexHullShape * unoptimizedHull;
btShapeHull * hullOptimizer;
btConvexHullShape * hullShape;
btTriangleMesh * triangleMesh;
btBvhTriangleMeshShape * triangleMeshShape;
btCollisionShape * collisionShape;
btDefaultMotionState * motionState;
btScalar mass;
btVector3 inertia;
btRigidBody * rigidBody;
Model * model;
};
class Physics {
private:
btBroadphaseInterface * broadphaseInterface;
btDefaultCollisionConfiguration * collisionConfiguration;
btCollisionDispatcher * collisionDispatcher;
btSequentialImpulseConstraintSolver * constraintSolver;
btDiscreteDynamicsWorld * world;
public:
void intialize();
void laodDynamicCollisionShape (PhysicsObject * physicsObject , const Model & model );
void loadStaticCollisionShaoe (PhysicsObject *physicsObject , const Model & model );
};
#endif //MODELLOADING_PHYSICS_H