|
mElite
1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
|
Base class for 3d game objects. More...
#include <GameObject.h>
Public Member Functions | |
| GameObject (void) | |
| The constructor creates the object. The position is set to zero by default. | |
| GameObject (Vector3 position) | |
| The constructor creates the object and gives it a position in the scene. | |
| GameObject (float x, float y, float z) | |
| The constructor creates the object and gives it a position in the scene. | |
| ~GameObject (void) | |
| Destructor. Does nothing. | |
| virtual Vector3 | getPos (void) |
| Returns the current position as Vector3 triple. | |
| void | setPos (float x, float y, float z) |
| Sets the current position. | |
| void | setPos (Vector3 position) |
| Sets the current position. | |
Base class for 3d game objects.
This class represents the basic game object used in the game. A game object basically has a position and does nothing.
Definition at line 15 of file GameObject.h.
| GameObject::GameObject | ( | void | ) |
The constructor creates the object. The position is set to zero by default.
Definition at line 11 of file GameObject.cpp.
| GameObject::GameObject | ( | Vector3 | position | ) |
The constructor creates the object and gives it a position in the scene.
| position | the position as Vector3 |
Definition at line 19 of file GameObject.cpp.
| GameObject::GameObject | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
The constructor creates the object and gives it a position in the scene.
| x | the x-position of the object |
| y | the x-position of the object |
| z | the x-position of the object |
Definition at line 29 of file GameObject.cpp.
| GameObject::~GameObject | ( | void | ) |
Destructor. Does nothing.
Definition at line 36 of file GameObject.cpp.
|
virtual |
Returns the current position as Vector3 triple.
Reimplemented in Planet.
Definition at line 42 of file GameObject.cpp.
| void GameObject::setPos | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Sets the current position.
| x | the new x-position |
| y | the new y-position |
| z | the new z-position |
Definition at line 60 of file GameObject.cpp.
| void GameObject::setPos | ( | Vector3 | position | ) |
Sets the current position.
| position | the new position as vector3 |
Definition at line 50 of file GameObject.cpp.
1.8.2