Cyclone Cyclone: cyclone::ForceRegistry Class Reference

cyclone::ForceRegistry Class Reference

Holds all the force generators and the bodies they apply to. More...

#include <fgen.h>

List of all members.

Public Member Functions

void add (RigidBody *body, ForceGenerator *fg)
 Registers the given force generator to apply to the given body.
void remove (RigidBody *body, ForceGenerator *fg)
 Removes the given registered pair from the registry.
void clear ()
 Clears all registrations from the registry.
void updateForces (real duration)
 Calls all the force generators to update the forces of their corresponding bodies.

Protected Types

typedef std::vector< ForceRegistrationRegistry
 Holds the list of registrations.

Protected Attributes

Registry registrations

Classes

struct  ForceRegistration
 Keeps track of one force generator and the body it applies to. More...


Detailed Description

Holds all the force generators and the bodies they apply to.


Member Typedef Documentation

typedef std::vector<ForceRegistration> cyclone::ForceRegistry::Registry [protected]
 

Holds the list of registrations.


Member Function Documentation

void cyclone::ForceRegistry::add RigidBody body,
ForceGenerator fg
 

Registers the given force generator to apply to the given body.

void cyclone::ForceRegistry::clear  ) 
 

Clears all registrations from the registry.

This will not delete the bodies or the force generators themselves, just the records of their connection.

void cyclone::ForceRegistry::remove RigidBody body,
ForceGenerator fg
 

Removes the given registered pair from the registry.

If the pair is not registered, this method will have no effect.

void cyclone::ForceRegistry::updateForces real  duration  ) 
 

Calls all the force generators to update the forces of their corresponding bodies.


Member Data Documentation

Registry cyclone::ForceRegistry::registrations [protected]
 


The documentation for this class was generated from the following file: