-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTeleporter.h
85 lines (72 loc) · 2.72 KB
/
Teleporter.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
Copyright (C) 2011-2012 Alican Sekerefe
TeamTwo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TeamTwo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact: [email protected]
*/
#ifndef TELEPORTER_H
#define TELEPORTER_H
#include "stdafx.h"
#include "Util/Converter.h"
#include "PhysicsShapeHandler.h"
/* Teleporter
This class is used for handling the attributes
and the graphics of the teleporters that are
used on the application.
*/
class Teleporter
{
public:
//constructor of the class. gets the id and input&output teleport position
Teleporter(int id,Ogre::Vector3 inPosition,Ogre::Vector3 outPosition);
//creates the visual parts of the teleporter
void createVisual(SceneManager* sceneManager);
//creates the physics on the teleporter objects
void createPhysics(OgreBulletDynamics::DynamicsWorld* dynamics);
//updates the graphics. usually called at the each frame
void updateGraphics();
//sets the status of the teleporter object
void setEnabled(bool value);
//returns true if the teleporter has been activated
bool isActivated();
//returns the id of the teleporter
int getID();
//deactivates the teleporter; hides the effects
void deactivate();
//activats the teleporter; shows the necessary effects
void activate();
//returns the rigidbody of the teleporter entrance point
OgreBulletDynamics::RigidBody* getTeleportPointRigid();
//returns the out position of the teleport
Ogre::Vector3 getOutPosition();
private:
int id;
Ogre::Vector3 inTelPos;
Ogre::Vector3 outTelPos;
SceneNode* inTelNode;
SceneNode* teleportPointNode;
SceneNode* outTelNode;
Entity* inTelEnt;
Entity* outTelEnt;
OgreBulletDynamics::RigidBody* inTelRigid;
OgreBulletDynamics::RigidBody* outTelRigid;
OgreBulletDynamics::RigidBody* teleportPointRigid;
BillboardSet* inTelBillboardSet;
Ogre::Light* bbLight;
bool activated;
std::string inTelSoundID;
std::string outTelSoundID;
ParticleSystem* inParticleSystem;
Ogre::SceneNode* inParticleNode;
ParticleSystem* outParticleSystem;
Ogre::SceneNode* outParticleNode;
};
#endif /* TELEPORTER_H */