-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameObject.h
43 lines (36 loc) · 903 Bytes
/
GameObject.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
39
40
41
42
43
#pragma once
#include <Ogre.h>
#include "Simulator.h"
#include <btBulletDynamicsCommon.h>
class OgreMotionState;
class GameObject {
protected:
Ogre::String name;
Ogre::SceneManager* sceneMgr;
Ogre::SceneNode* rootNode;
Ogre::Entity* geom;
Simulator* simulator;
btMotionState* ms;
btCollisionShape* shape;
btRigidBody* body;
//physical properties
btScalar mass;
btScalar friction;
btScalar restitution;
btVector3 position;
btVector3 inertia;
btQuaternion rotation;
public:
GameObject();
void addToSimulator();
btRigidBody* getBody();
void setSimulator(Simulator* insim);
void printpos();
Ogre::SceneNode* getNode();
Ogre::String getName();
void updateTransform();
void setTransform(Ogre::Vector3 tr);
void setTransform(btVector3 tr);
Ogre::Vector3 getPos();
void setPos(btVector3 pos);
};