Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ParticleSystems::DataStructure Class Reference

The DataStructure Class. More...

#include <DataStructure.h>

Inheritance diagram for ParticleSystems::DataStructure:

ParticleSystems::VectorDS List of all members.

Public Member Functions

 DataStructure ()
 The Constructor.
virtual ~DataStructure ()
 The Destructor.
virtual void addParticles (Particle *particle)=0
 An abstract Function.
virtual void killParticles ()=0
 An abstract Function.
virtual void addCollisionObject (CollisionObject *co)=0
 An abstract Function.
virtual void deleteCollisionObject (CollisionObject *co)=0
 An abstract Function.
virtual bool positionCheck (GraphicsLib::Point3 pos)=0
 An abstract Function.
virtual void evolve ()=0
 An abstract Function.
virtual void draw ()=0
 An abstract Function.
virtual int numParticles ()=0
 An abstract Function.
virtual bool hasDead ()=0
 An abstract Function.
virtual ParticlegetDead ()=0
 An abstract Function.

Public Attributes

int storageCapacity
 A public variable.
bool collision
 A public variable.

Detailed Description

The DataStructure Class.

The DataStructure Class is the Superclass for all Classes that want to store the Particles for a ParticleSystem. Its main responsibility is to store Particles and the management of these Particles. A DataStructure should store new Particles and store dead Particles for rebirth. In addition it should store any Objects in the scene with which Particles can collide.

Author:
Hannes Ricklefs

Definition at line 28 of file DataStructure.h.


Constructor & Destructor Documentation

DataStructure::DataStructure  ) 
 

The Constructor.

Constructs a new DataStructure

Definition at line 10 of file DataStructure.cpp.

References collision.

DataStructure::~DataStructure  )  [virtual]
 

The Destructor.

Destructs a DataStructure

Definition at line 15 of file DataStructure.cpp.


Member Function Documentation

virtual void ParticleSystems::DataStructure::addCollisionObject CollisionObject co  )  [pure virtual]
 

An abstract Function.

Add a new CollisionObject to the DataStructure

Parameters:
co a pointer to the CollisionObject

Implemented in ParticleSystems::VectorDS.

Referenced by multiCollision().

virtual void ParticleSystems::DataStructure::addParticles Particle particle  )  [pure virtual]
 

An abstract Function.

Adds a new Particle.

Parameters:
particle a pointer to the new Particle

Implemented in ParticleSystems::VectorDS.

Referenced by ParticleSystems::ParticleSystem::newParticle().

virtual void ParticleSystems::DataStructure::deleteCollisionObject CollisionObject co  )  [pure virtual]
 

An abstract Function.

Deletes the given CollisionObject

Parameters:
co a pointer to the about to be deleted CollisionObject

Implemented in ParticleSystems::VectorDS.

virtual void ParticleSystems::DataStructure::draw  )  [pure virtual]
 

An abstract Function.

Draws all the Particle and CollisionObjects within this DataStructure

Implemented in ParticleSystems::VectorDS.

Referenced by ParticleSystems::ParticleSystem::draw().

virtual void ParticleSystems::DataStructure::evolve  )  [pure virtual]
 

An abstract Function.

Evolves the Particles within the DataStructure

Implemented in ParticleSystems::VectorDS.

Referenced by ParticleSystems::ParticleSystem::evolve().

virtual Particle* ParticleSystems::DataStructure::getDead  )  [pure virtual]
 

An abstract Function.

Returns a pointer to a dead Particle !! Should only be used if hasDead returns True !! Otherwise NULL will be returned.

Returns:
A pointer to a dead Particle.

Implemented in ParticleSystems::VectorDS.

Referenced by ParticleSystems::ParticleSystem::newParticle().

virtual bool ParticleSystems::DataStructure::hasDead  )  [pure virtual]
 

An abstract Function.

Returns true if the DataStructure contains any dead Particles

Returns:
True is dead Particles are stored

Implemented in ParticleSystems::VectorDS.

Referenced by ParticleSystems::ParticleSystem::newParticle().

virtual void ParticleSystems::DataStructure::killParticles  )  [pure virtual]
 

An abstract Function.

Removes all Particles

Implemented in ParticleSystems::VectorDS.

Referenced by ParticleSystems::ParticleSystem::killParticles().

virtual int ParticleSystems::DataStructure::numParticles  )  [pure virtual]
 

An abstract Function.

Return the number of Particles within the DataStructure as an int.

Returns:
The number of Particles

Implemented in ParticleSystems::VectorDS.

virtual bool ParticleSystems::DataStructure::positionCheck GraphicsLib::Point3  pos  )  [pure virtual]
 

An abstract Function.

Checks is the given point is colliding with any of the CollisionObjects.

Parameters:
pos the position to be checked
Returns:
True if in collision range

Implemented in ParticleSystems::VectorDS.


Member Data Documentation

bool ParticleSystems::DataStructure::collision
 

A public variable.

If set to true collision tests will be performed set to false as default

Definition at line 129 of file DataStructure.h.

Referenced by DataStructure(), and multiCollision().

int ParticleSystems::DataStructure::storageCapacity
 

A public variable.

Specifies how many need to be stored inorder not to save too many dead particles

Definition at line 122 of file DataStructure.h.

Referenced by ParticleSystems::ParticleSystem::ParticleSystem().


The documentation for this class was generated from the following files:
Generated on Thu Mar 24 11:05:02 2005 for ParticleSystem by  doxygen 1.4.1