forked from luke-c-sargent/ogre_3rd_person_ninjas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameObject.h
executable file
·51 lines (43 loc) · 1.08 KB
/
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
44
45
46
47
48
49
50
51
#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:
Ogre::Vector3 m_directionVector;
Ogre::Real power;
bool hit;
GameObject();
void addToSimulator();
btRigidBody* getBody();
void setSimulator(Simulator* insim);
void printpos();
Ogre::SceneNode* getNode();
Ogre::String getName();
Ogre::SceneManager* getSMP();
void updateTransform();
void setTransform(Ogre::Vector3 tr);
void setTransform(btVector3 tr);
Ogre::Vector3 getPos();
btVector3 getPosbt();
void setPos(btVector3 pos);
void setRotation(btQuaternion rot);
Ogre::Entity* getEntity();
};