forked from luke-c-sargent/ogre_3rd_person_ninjas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Simulator.h
executable file
·38 lines (33 loc) · 1.09 KB
/
Simulator.h
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
#pragma once
#include <Ogre.h>
#include <btBulletDynamicsCommon.h>
#include <vector>
//#include "Monster.h"
class GameObject;
struct ContactCallback;
class Simulator{
protected:
btDefaultCollisionConfiguration* collisionConfig;
btCollisionDispatcher* dispatcher;
ContactCallback* ccp;
btBroadphaseInterface* broadphase;
btSequentialImpulseConstraintSolver* solver;
btDiscreteDynamicsWorld* dynamicsWorld; //inherits from CollisionWorld
btConstraintSolver* mConstraintsolver;
Ogre::SceneManager* sceneMgr;
std::deque<GameObject*> objList;
public:
Simulator();
void stepSimulation(const Ogre::FrameEvent& evt, const Ogre::Real elapsedTime, int maxSubSteps, const Ogre::Real fixedTimestep);
bool checkHit(int o);
btDiscreteDynamicsWorld* getWorld();
void addObject(GameObject* o);
GameObject * getObjectPtr(int i);
int getObjectListSize();
void clearObjectList();
int monsters_killed;
int lvl_monsters_killed;
int lives;
int lvl_lives;
btCollisionWorld::ClosestRayResultCallback RayCallBack(btVector3 start, btVector3 end);
};