LiquidFun
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Friends | List of all members
b2ParticleGroup Class Reference

A group of particles. b2ParticleGroup::CreateParticleGroup creates these. More...

#include <b2ParticleGroup.h>

Public Member Functions

b2ParticleGroupGetNext ()
 Get the next particle group from the list in b2_World.
 
const b2ParticleGroupGetNext () const
 
b2ParticleSystemGetParticleSystem ()
 Get the particle system that holds this particle group.
 
const b2ParticleSystemGetParticleSystem () const
 
int32 GetParticleCount () const
 Get the number of particles.
 
int32 GetBufferIndex () const
 Get the offset of this group in the global particle buffer.
 
bool ContainsParticle (int32 index) const
 Does this group contain the particle.
 
uint32 GetAllParticleFlags () const
 Get the logical sum of particle flags.
 
uint32 GetGroupFlags () const
 Get the construction flags for the group.
 
void SetGroupFlags (uint32 flags)
 Set the construction flags for the group.
 
float32 GetMass () const
 Get the total mass of the group: the sum of all particles in it.
 
float32 GetInertia () const
 Get the moment of inertia for the group.
 
b2Vec2 GetCenter () const
 Get the center of gravity for the group.
 
b2Vec2 GetLinearVelocity () const
 Get the linear velocity of the group.
 
float32 GetAngularVelocity () const
 Get the angular velocity of the group.
 
const b2TransformGetTransform () const
 
const b2Vec2GetPosition () const
 
float32 GetAngle () const
 
b2Vec2 GetLinearVelocityFromWorldPoint (const b2Vec2 &worldPoint) const
 
void * GetUserData () const
 Get the user data pointer that was provided in the group definition.
 
void SetUserData (void *data)
 Set the user data. Use this to store your application specific data.
 
void ApplyForce (const b2Vec2 &force)
 Call b2ParticleSystem::ApplyForce for every particle in the group.
 
void ApplyLinearImpulse (const b2Vec2 &impulse)
 
void DestroyParticles (bool callDestructionListener)
 
void DestroyParticles ()
 

Friends

class b2ParticleSystem
 

Detailed Description

A group of particles. b2ParticleGroup::CreateParticleGroup creates these.

Member Function Documentation

void b2ParticleGroup::ApplyLinearImpulse ( const b2Vec2 impulse)

Call b2ParticleSystem::ApplyLinearImpulse for every particle in the group.

void b2ParticleGroup::DestroyParticles ( bool  callDestructionListener)

Destroy all the particles in this group. This function is locked during callbacks.

Parameters
Whetherto call the world b2DestructionListener for each particle is destroyed.
Warning
This function is locked during callbacks.
void b2ParticleGroup::DestroyParticles ( )
inline

Destroy all particles in this group without enabling the destruction callback for destroyed particles. This function is locked during callbacks.

Warning
This function is locked during callbacks.
float32 b2ParticleGroup::GetAngle ( ) const
inline

Get the rotational angle of the particle group as a whole. Used only with groups of rigid particles.

b2Vec2 b2ParticleGroup::GetLinearVelocityFromWorldPoint ( const b2Vec2 worldPoint) const
inline

Get the world linear velocity of a world point, from the average linear and angular velocities of the particle group.

Parameters
apoint in world coordinates.
Returns
the world velocity of a point.
const b2Vec2 & b2ParticleGroup::GetPosition ( ) const
inline

Get position of the particle group as a whole. Used only with groups of rigid particles.

const b2Transform & b2ParticleGroup::GetTransform ( ) const
inline

Get the position of the group's origin and rotation. Used only with groups of rigid particles.


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