mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
GameObject Class Reference

Base class for 3d game objects. More...

#include <GameObject.h>

Inheritance diagram for GameObject:
GraphicsObject MovingObject SpinningObject ModelObject QuadricObject CameraObject SpaceShip Planet SpaceStation SpaceShip SpaceStation Planet PlayerObject abstract PlayerObject Star abstract PlayerObject Star

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
positionthe 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.

Parameters
xthe x-position of the object
ythe x-position of the object
zthe 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.

Member Function Documentation

Vector3 GameObject::getPos ( void  )
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.

Parameters
xthe new x-position
ythe new y-position
zthe new z-position

Definition at line 60 of file GameObject.cpp.

void GameObject::setPos ( Vector3  position)

Sets the current position.

Parameters
positionthe new position as vector3

Definition at line 50 of file GameObject.cpp.


The documentation for this class was generated from the following files: