GravityFieldSimple Class Reference

#include <rimForceFieldGravitySimple.h>

Inheritance diagram for GravityFieldSimple:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 GravityFieldSimple ()
 Create a new simple gravity field with Earth's gravity in the negative Y direction.
 GravityFieldSimple (const Vector3 &gravityVector)
 Create a new simple gravity with the specified gravity force vector.
virtual ~GravityFieldSimple ()
 Destroy a simple gravity field.
virtual void applyForces (Real dt)
 Apply forces to all objects in the force field.
virtual const Vector3getGravityVector () const
 Get the gravity force vector which is applied to the objects and particles.
virtual void setGravityVector (const Vector3 &newGravityVector)
 Set the gravity force vector which is applied to the objects and particles.
virtual bool addRigidObject (RigidObject *newRigidObject)
 Add a rigid object to the simple gravity field.
virtual bool removeRigidObject (RigidObject *newRigidObject)
 Remove a rigid object from the simple gravity field.
virtual bool containsRigidObject (RigidObject *newRigidObject) const
 Get whether or not a rigid object is contained in the simple gravity field.
virtual void clearRigidObjects ()
 Clear all rigid objects from the simple gravity field.
virtual int getNumberOfRigidObjects () const
 Get the number of rigid objects in the simple gravity field.
virtual bool addParticle (Particle *newParticle)
 Add a particle to this simple gravity field.
virtual bool removeParticle (Particle *newParticle)
 Remove a particle from this simple gravity field.
virtual bool containsParticle (Particle *newParticle) const
 Return whether or not a particle is contained in this simple gravity field.
virtual void clearParticles ()
 Clear all particles from the simple gravity field.
virtual int getNumberOfParticles () const
 Get the number of particles in this simple gravity field.
virtual const ForceTypegetType () const
 Get an object representing the type of this force.

Private Attributes

ArrayList< RigidObject * > rigidObjects
 The rigid objects that are affected by this gravity field.
ArrayList< Particle * > particles
 The particles that are affected by this gravity field.
Vector3 gravityVector
 The gravity force vector for this simple gravity field.

Static Private Attributes

static const ForceType forceType = "Simple Gravity Field"


Constructor & Destructor Documentation

RIM_PHYSICS_NAMESPACE_START GravityFieldSimple::GravityFieldSimple (  ) 

Create a new simple gravity field with Earth's gravity in the negative Y direction.

GravityFieldSimple::GravityFieldSimple ( const Vector3 gravityVector  ) 

Create a new simple gravity with the specified gravity force vector.

GravityFieldSimple::~GravityFieldSimple (  )  [virtual]

Destroy a simple gravity field.


Member Function Documentation

void GravityFieldSimple::applyForces ( Real  dt  )  [virtual]

Apply forces to all objects in the force field.

Implements Force.

const Vector3 & GravityFieldSimple::getGravityVector (  )  const [virtual]

Get the gravity force vector which is applied to the objects and particles.

void GravityFieldSimple::setGravityVector ( const Vector3 newGravityVector  )  [virtual]

Set the gravity force vector which is applied to the objects and particles.

bool GravityFieldSimple::addRigidObject ( RigidObject newRigidObject  )  [virtual]

Add a rigid object to the simple gravity field.

Implements PhysicsSystem.

bool GravityFieldSimple::removeRigidObject ( RigidObject newRigidObject  )  [virtual]

Remove a rigid object from the simple gravity field.

Implements PhysicsSystem.

bool GravityFieldSimple::containsRigidObject ( RigidObject newRigidObject  )  const [virtual]

Get whether or not a rigid object is contained in the simple gravity field.

Implements PhysicsSystem.

void GravityFieldSimple::clearRigidObjects (  )  [virtual]

Clear all rigid objects from the simple gravity field.

Implements PhysicsSystem.

int GravityFieldSimple::getNumberOfRigidObjects (  )  const [virtual]

Get the number of rigid objects in the simple gravity field.

Implements PhysicsSystem.

bool GravityFieldSimple::addParticle ( Particle newParticle  )  [virtual]

Add a particle to this simple gravity field.

Implements PhysicsSystem.

bool GravityFieldSimple::removeParticle ( Particle newParticle  )  [virtual]

Remove a particle from this simple gravity field.

Implements PhysicsSystem.

bool GravityFieldSimple::containsParticle ( Particle newParticle  )  const [virtual]

Return whether or not a particle is contained in this simple gravity field.

Implements PhysicsSystem.

void GravityFieldSimple::clearParticles (  )  [virtual]

Clear all particles from the simple gravity field.

Implements PhysicsSystem.

int GravityFieldSimple::getNumberOfParticles (  )  const [virtual]

Get the number of particles in this simple gravity field.

Implements PhysicsSystem.

virtual const ForceType& GravityFieldSimple::getType (  )  const [inline, virtual]

Get an object representing the type of this force.

Implements Force.


Member Data Documentation

ArrayList<RigidObject*> GravityFieldSimple::rigidObjects [private]

The rigid objects that are affected by this gravity field.

ArrayList<Particle*> GravityFieldSimple::particles [private]

The particles that are affected by this gravity field.

Vector3 GravityFieldSimple::gravityVector [private]

The gravity force vector for this simple gravity field.

const ForceType GravityFieldSimple::forceType = "Simple Gravity Field" [static, private]


The documentation for this class was generated from the following files:
Generated on Tue Aug 26 00:03:20 2008 for Rim Physics by  doxygen 1.5.4