Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

Ship Class Reference

#include <gameobjs.h>

Inheritance diagram for Ship:

Inheritance graph
[legend]
Collaboration diagram for Ship:

Collaboration graph
[legend]
List of all members.

Detailed Description

The ship object.

With a long way to go


Public Types

enum  TurnType {
  Left, WasLeft, Right, WasRight,
  None
}
 An enumeration to keep track of where we are with turning. More...

Public Member Functions

 Ship (float xin, float yin, float zin)
 Ships are susceptible to gravity and can fire at a moment's notice.
 ~Ship ()
 Extraneous destructor.
void set_dim (float xin, float yin, float zin)
 Set size of ship.
void setThrust (bool in)
 Set by game to tell ship to thrust.
void setFiring (bool in)
 Set by game to tell ship to fire.
void setTurning (enum TurnType in)
 Set by game to tell ship if it is turning (or was turning).
void respawn (float xin, float yin, float zin)
 Lump all the things you need to do when you respawn together.
void update (float time)
 Updates ship and its children.
void render (void)
 This function not only draws the ship but also each bullet and exhaust particle.


Member Enumeration Documentation

enum Ship::TurnType
 

An enumeration to keep track of where we are with turning.

The Was* functions allow us to stop turning in a nice manner.


Constructor & Destructor Documentation

Ship::Ship float  xin,
float  yin,
float  zin
 

Ships are susceptible to gravity and can fire at a moment's notice.

They also start off not firing or thrusting. Currently it is scaleable, but this may not be necessary.

Here is the call graph for this function:


Member Function Documentation

void Ship::respawn float  xin,
float  yin,
float  zin
 

Lump all the things you need to do when you respawn together.

Parameters:
xin X Coord of respawn pos.
yin Y.
zin Z.

Here is the call graph for this function:

void Ship::set_dim float  xin,
float  yin,
float  zin
[inline]
 

Set size of ship.

Probably broken - DO NOT USE.

void Ship::update float  time  )  [virtual]
 

Updates ship and its children.

Moves ship, rotates, etc. Also creates bullets, exhaust, if reqd. This is done by iterating through the list of possible bullets or exhaust, and regenerating objects as required.

Parameters:
time Time in seconds to integrate over.

Todo:
Make firing rate variable.

Implements AbsObj.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Jan 3 15:14:20 2005 for Graviton by  doxygen 1.3.9.1