Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Spectre Class Reference

This is the standard Unit in ethereal, the cyber-tank. More...

#include <spectre.h>

Inherits IdCollidable.

Inherited by _classes_ [private].

Inheritance diagram for Spectre:

Inheritance graph
[legend]
Collaboration diagram for Spectre:

Collaboration graph
[legend]
List of all members.

Public Methods

void collide (Spectre *oth)
 Spectre ()
 Spectre (std::string name, const Matrix &mat, int surface, int id=-1)
void setPosition (const QVector &newPos)
void update ()
 figures out what to do next? More...

void draw (class Surface *par)
CollideKey recalculateCollideKey () const
 Returns the collideKey based on the position, but does not change the key (use changeKey below to change it). More...

void changeKey (const CollideKey &key)
 Changes the collideKey to another ColldieKey (usually returned from the above function). More...

CollideKey getCollideKey ()
 The CollideKey based on the position of the Collidable . More...


Protected Attributes

CollideKey collideKey

Private Methods

void calculateCollideKey (int surface)

Private Attributes

float shields
int ammo
AutoCloner< AIai

Detailed Description

This is the standard Unit in ethereal, the cyber-tank.


Constructor & Destructor Documentation

Spectre::Spectre   [inline]
 

00039 : IdCollidable () {}

Spectre::Spectre std::string    name,
const Matrix   mat,
int    surface,
int    id = -1
 

00035         : IdCollidable (name, mat, id), collideKey (surface, getPosition().Magnitude2d()) {
00036 }


Member Function Documentation

void Spectre::calculateCollideKey int    surface [inline, private]
 

00031                                            {
00032         collideKey.radius=getPosition().Magnitude2d();
00033         collideKey.surface=surface;
00034     }

void Spectre::changeKey const CollideKey   key [inline]
 

Changes the collideKey to another ColldieKey (usually returned from the above function).

00055                                            {
00056         collideKey=key;
00057     }

void Spectre::collide Spectre *    oth
 

00089                                    {
00090     MyCollide(minimum(this->getId(), oth->getId()),maximum(this->getId(), oth->getId()));
00091 }

void Spectre::draw class Surface   par
 

CollideKey Spectre::getCollideKey   [inline]
 

The CollideKey based on the position of the Collidable .

00059                                 {
00060         return collideKey;
00061     }

CollideKey Spectre::recalculateCollideKey   const [inline]
 

Returns the collideKey based on the position, but does not change the key (use changeKey below to change it).

00051                                               {
00052         return CollideKey(collideKey.surface, getPosition().Magnitude2d());
00053     }

void Spectre::setPosition const QVector   newPos [inline]
 

00042                                              {
00043         pos.pos()=newPos;
00044 //ssss      calculateCollideKey(collideKey.surface); DEPRECATED!!! WATCH OUT
00045     }

void Spectre::update  
 

figures out what to do next?


Member Data Documentation

AutoCloner<AI> Spectre::ai [private]
 

int Spectre::ammo [private]
 

CollideKey Spectre::collideKey [protected]
 

float Spectre::shields [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Jul 7 21:13:55 2003 for Ethereal by doxygen1.2.15