-
Notifications
You must be signed in to change notification settings - Fork 0
/
Court.h
35 lines (29 loc) · 1010 Bytes
/
Court.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
#pragma once
#include <Ogre.h>
#include <GameObject.h>
class Court:public GameObject{
protected:
//geometry
Ogre::Plane plane;
//child scene nodes
Ogre::SceneNode* wallnode;
Ogre::SceneNode* frontnode;
Ogre::SceneNode* backnode;
Ogre::SceneNode* floornode;
Ogre::SceneNode* ceilingnode;
//wall bodies
btRigidBody* body2,*body3,*body4,*body5,*body6;
btMotionState *ms2,*ms3,*ms4,*ms5,*ms6;
btCollisionShape *shape2,*shape3,*shape4,*shape5,*shape6;
public:
Court(Ogre::SceneManager * smp);
//dimensions - 1 unit = 1 inch
Ogre::Real length;
Ogre::Real width;
Ogre::Real height;
Ogre::Real goalline;
void createPlane(Ogre::String name, Ogre::Real x, Ogre::Real y, Ogre::String material, Ogre::Vector3 translation, Ogre::Vector3 rotationvector,Ogre::Real degree);
void addWalls();
void addWall(btRigidBody*& bod, btCollisionShape*& shap, btMotionState*& ms, btVector3 normal, btVector3 pos, btQuaternion ori);
void addToSimulator();
};