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 | Static Public Member Functions | List of all members
abstract Class Referenceabstract

An abstract class for objects that can receive mouse input. The mouse handling and drawing must be implemented. More...

#include <ClickableObject.h>

Inheritance diagram for abstract:
SpaceShip MovingObject ModelObject GameObject GraphicsObject GameObject

Public Member Functions

 ClickableObject (void)
 
virtual void mouseClick ()=0
 
virtual bool isMouseOverObject ()=0
 
virtual void draw ()=0
 Draws the object.
 
 ForeignSpaceShip (float r, GLuint displayList)
 
 ~ForeignSpaceShip (void)
 
void update (float t)
 
- Public Member Functions inherited from SpaceShip
 SpaceShip (float r, GLuint displayList)
 Initializes the space ship.
 
 SpaceShip (Vector3 position, float r, GLuint displayList)
 Initializes the space ship.
 
 SpaceShip (float x, float y, float z, float r, GLuint displayList)
 Initializes the space ship.
 
 ~SpaceShip (void)
 Destructor.
 
void draw ()
 Draws the object using the base class drawing method.
 
Vector3 getOriginalView (void)
 Returns the original view vector.
 
Vector3 getOriginalUp (void)
 Returns the original up vector.
 
bool isDestroyed ()
 Determines wheather a ship is destroyed or not.
 
float getLaserHeat (void)
 Returns the current heat of the laser.
 
float getMaxLaserHeat (void)
 
float getLaserPercentage (void)
 Returns the percentage of the heat of the maximal heat.
 
unsigned int getMissileCount (void)
 Returns the current amount of missiles.
 
bool isOverHeated (void)
 Returns true if the laser is overheated, otherwise false.
 
void useMissile (void)
 Shoots a missile, if possible.
 
bool isShooting ()
 
void setShoot (bool status)
 
float getBackShieldPower (void)
 Returns the current back shield power.
 
float getBackShieldPowerPercentage (void)
 Returns the current percentage of back shield power.
 
float getFrontShieldPower (void)
 Returns the current front shield power.
 
float getFrontShieldPowerPercentage (void)
 Returns the current percentage of front shield power.
 
void setShieldRecovering (bool recovers)
 
void receiveHitBack (DWORD time)
 
void receiveHitFront (DWORD time)
 
void setShieldCapacity (float capacity)
 
bool shipWasHitOnce ()
 
- Public Member Functions inherited from MovingObject
 MovingObject ()
 Constructor, initializes to the origin. The line of vision is aligned to the z axis, the up vector is aligned to the y-axis.
 
 MovingObject (Vector3 position)
 Constructor initializing to a given position as Vector3.
 
 MovingObject (float x, float y, float z)
 Constructor, the startposition is (x,y,z).
 
 ~MovingObject (void)
 Destructor.
 
void pitch (float angle)
 Pitches the line of vision.
 
void roll (float angle)
 Rolls the eye.
 
Vector3 getRight (void)
 Returns the vector indiciating what is 'right' of the eye.
 
Vector3 getUp (void)
 Returns the vector indication what is 'up'.
 
Vector3 getView (void)
 Returns the current viewing vector.
 
void setView (Vector3 v)
 Sets the current viewing vector.
 
void accelerate (float step)
 Sets the speed.
 
void advance (float t)
 Move the camera depending on the current speed and line of vision.
 
float getMaxSpeed (void)
 Returns the maximal speed.
 
float getMinSpeed (void)
 Returns the minimal speed.
 
float getSpeed (void)
 Returns the vector indicating the direction 'right'.
 
void setMaxSpeed (float speed)
 Sets the maximal speed.
 
void setMinSpeed (float speed)
 Sets the minimal speed.
 
void setSpeed (float speed)
 Sets the current speed.
 
void setStep (float step)
 Sets the value that is advanced in one step.
 
- Public Member Functions inherited from GameObject
 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.
 
- Public Member Functions inherited from ModelObject
 ModelObject (GLuint displayList)
 Creates a model object and sets up the display List.
 
 ModelObject (float r, GLuint displayList)
 Creates a model object and sets up the display List.
 
 ModelObject (Vector3 position, float r, GLuint displayList)
 Creates a model object and sets up the display List.
 
 ModelObject (float x, float y, float z, float r, GLuint displayList)
 Creates a model object and sets up the display List.
 
 ~ModelObject (void)
 The destructor has nothing to clean up.
 
- Public Member Functions inherited from GraphicsObject
 GraphicsObject (void)
 The constructor creates the object.
 
 GraphicsObject (GLfloat r)
 The constructor creates the object.
 
 GraphicsObject (Vector3 position, float r)
 Creates an graphical object.
 
 GraphicsObject (float x, float y, float z, float r)
 Creates a graphical object.
 
 ~GraphicsObject (void)
 Destructor.
 
float getRadius (void)
 Returns the radius of the object, usable for view frustum culling.
 
float getCollisionRadius (void)
 Returns the radius of the object, usable for collision detection.
 

Static Public Member Functions

static void clickAll ()
 
static void drawAll ()
 

Additional Inherited Members

- Protected Member Functions inherited from SpaceShip
void advance (float t)
 
void updateLaser (float t)
 
void setLaserHeat (float heat)
 
virtual void coolLaser (DWORD time)
 Cools the laser.
 

Detailed Description

An abstract class for objects that can receive mouse input. The mouse handling and drawing must be implemented.

Definition at line 10 of file ClickableObject.h.

Constructor & Destructor Documentation

abstract::~ForeignSpaceShip ( void  )

Member Function Documentation

abstract::ClickableObject ( void  )
static void abstract::clickAll ( )
static
virtual void abstract::draw ( void  )
pure virtual

Draws the object.

Draws the object using the display list. Therefore no textur and color information is needed. All actions that are necessary to draw the object should take place in the list. It is possible to create a derived class that does something else and calls this draw() method to draw the model.

See Also
SpaceStation::draw() where this function is combined with a spinning object.

Reimplemented from ModelObject.

static void abstract::drawAll ( )
static
abstract::ForeignSpaceShip ( float  r,
GLuint  displayList 
)
virtual bool abstract::isMouseOverObject ( )
pure virtual
virtual void abstract::mouseClick ( )
pure virtual
void abstract::update ( float  t)
virtual

Reimplemented from SpaceShip.


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