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

Bolt Class Reference

This is a basic Bolt class. More...

#include <bolt.h>

Inherits IdCollidable.

Inherited by _classes_ [private].

Inheritance diagram for Bolt:

Inheritance graph
[legend]
Collaboration diagram for Bolt:

Collaboration graph
[legend]
List of all members.

Public Methods

void calculateCollideKey ()
void collide (class Spectre *oth)
 Bolt ()
 Bolt (std::string name, const Matrix &pos, int id=-1)
void setPosition (const QVector &newPos)
CollideKey getCollideKey ()
CollideKey recalculateCollideKey ()
 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...


Protected Attributes

CollideKey collideKey

Detailed Description

This is a basic Bolt class.


Constructor & Destructor Documentation

Bolt::Bolt   [inline]
 

00029 : IdCollidable (), collideKey (0) {}

Bolt::Bolt std::string    name,
const Matrix   pos,
int    id = -1
 

00023         : IdCollidable (name, mat, id), collideKey (getPosition().Magnitude2d()) {
00024 }


Member Function Documentation

void Bolt::calculateCollideKey   [inline]
 

00022                                 {
00023         collideKey.radius=getPosition().Magnitude2d();
00024     }

void Bolt::changeKey const CollideKey   key [inline]
 

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

00044                                            {
00045         collideKey=key;
00046     }

void Bolt::collide class Spectre   oth
 

00093                                 {
00094     MyCollide(oth->getId(), -this->getId());
00095 }

CollideKey Bolt::getCollideKey   [inline]
 

00036                                 {
00037         return collideKey;
00038     }

CollideKey Bolt::recalculateCollideKey   [inline]
 

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

00040                                         {
00041         return CollideKey(getPosition().Magnitude2d());
00042     }

void Bolt::setPosition const QVector   newPos [inline]
 

00032                                              {
00033         pos.pos()=newPos;
00034 //      calculateCollideKey();
00035     }


Member Data Documentation

CollideKey Bolt::collideKey [protected]
 


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