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

Collidable Class Reference

A Collidable is the base class for all objects containing a mesh. This includes Spectre , Obstacle and Bolt . More...

#include <collidable.h>

Inherited by _classes_ [private], IdCollidable, and Obstacle.

Inheritance diagram for Collidable:

Inheritance graph
[legend]
Collaboration diagram for Collidable:

Collaboration graph
[legend]
List of all members.

Public Types

typedef RefClass< Model, std::string > ModelRef

Public Methods

 Collidable ()
 The default constructor. More...

 Collidable (std::string filename, const Matrix &pos)
 The constructor for Collidable that takes in a filename and a position. More...

void collide (Collidable *oth)
float getRadius () const
 This is the maximum radius of the Collidable . More...

VectorHash getVectorHash () const
 Returns the hash of its Vector . More...

const QVectorgetPosition () const
 Returns the position of the Collidable . More...

QVector getMin () const
QVector getMax () const

Public Attributes

std::string name
ModelRef model
 This is the Model (using the above typedef) that this object uses to draw or collide. More...

Matrix pos
 This is the object's position and direction. More...


Detailed Description

A Collidable is the base class for all objects containing a mesh. This includes Spectre , Obstacle and Bolt .

This class contains a RefClass of a Model or class with a mesh and a Texture . Another item in this class is a Matrix that gives direction and position for drawing.


Member Typedef Documentation

typedef RefClass<Model,std::string> Collidable::ModelRef
 


Constructor & Destructor Documentation

Collidable::Collidable   [inline]
 

The default constructor.

00019 {}

Collidable::Collidable std::string    filename,
const Matrix   pos
 

The constructor for Collidable that takes in a filename and a position.

00105         :model(str), pos (mat) {
00106 //  printf("Position: <%f,%f,%f>, RSize: %f\n", pos.position.i,pos.position.j,pos.position.k, getRadius());
00107 }


Member Function Documentation

void Collidable::collide Collidable *    oth
 

00070                                            {
00071     printf("ERROR");
00072 }

QVector Collidable::getMax   const [inline]
 

00029                            {
00030         return Transform(pos,model->getMax());
00031     }

QVector Collidable::getMin   const [inline]
 

00026                            {
00027         return Transform(pos,model->getMin());
00028     }

const QVector& Collidable::getPosition   const [inline]
 

Returns the position of the Collidable .

float Collidable::getRadius   const [inline]
 

This is the maximum radius of the Collidable .

class VectorHash Collidable::getVectorHash   const
 

Returns the hash of its Vector .


Member Data Documentation

ModelRef Collidable::model
 

This is the Model (using the above typedef) that this object uses to draw or collide.

std::string Collidable::name
 

Matrix Collidable::pos
 

This is the object's position and direction.


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