Cyclone | Cyclone: cyclone::ParticleWorld Class Reference |
#include <pworld.h>
Collaboration diagram for cyclone::ParticleWorld:
Public Types | |
typedef std::vector< Particle * > | Particles |
typedef std::vector< ParticleContactGenerator * > | ContactGenerators |
Public Member Functions | |
ParticleWorld (unsigned maxContacts, unsigned iterations=0) | |
Creates a new particle simulator that can handle up to the given number of contacts per frame.ParticleWorld. | |
unsigned | generateContacts () |
Calls each of the registered contact generators to report their contacts. | |
void | integrate (real duration) |
Integrates all the particles in this world forward in time by the given duration. | |
void | runPhysics (real duration) |
Processes all the physics for the particle world.ParticleWorldRun. | |
void | startFrame () |
Initializes the world for a simulation frame. | |
Particles & | getParticles () |
Returns the list of particles. | |
ContactGenerators & | getContactGenerators () |
Returns the list of contact generators. | |
ParticleForceRegistry & | getForceRegistry () |
Returns the force registry. | |
Protected Attributes | |
Particles | particles |
Holds the particles. | |
bool | calculateIterations |
True if the world should calculate the number of iterations to give the contact resolver at each frame. | |
ParticleForceRegistry | registry |
Holds the force generators for the particles in this world. | |
ParticleContactResolver | resolver |
Holds the resolver for contacts. | |
ContactGenerators | contactGenerators |
Contact generators. | |
ParticleContact * | contacts |
Holds the list of contacts. | |
unsigned | maxContacts |
Holds the maximum number of contacts allowed (i.e. |
|
|
|
|
|
Creates a new particle simulator that can handle up to the given number of contacts per frame.ParticleWorld. You can also optionally give a number of contact-resolution iterations to use. If you don't give a number of iterations, then twice the number of contacts will be used. |
|
Calls each of the registered contact generators to report their contacts. Returns the number of generated contacts. |
|
Returns the list of contact generators.
|
|
Returns the force registry.
|
|
Returns the list of particles.
|
|
Integrates all the particles in this world forward in time by the given duration.
|
|
Processes all the physics for the particle world.ParticleWorldRun.
|
|
Initializes the world for a simulation frame. This clears the force accumulators for particles in the world. After calling this, the particles can have their forces for this frame added. |
|
True if the world should calculate the number of iterations to give the contact resolver at each frame.
|
|
Contact generators.
|
|
Holds the list of contacts.
|
|
Holds the maximum number of contacts allowed (i.e. the size of the contacts array). |
|
Holds the particles.
|
|
Holds the force generators for the particles in this world.
|
|
Holds the resolver for contacts.
|
© 2000-2003 Icosagon. All Rights Reserved.
Distributed under licence.
Cyclone Version 2.0.5 (Documentation generated Fri Nov 10 20:44:29 2006). |