A group of particles. b2ParticleGroup::CreateParticleGroup creates these. More...
#include <b2ParticleGroup.h>
Public Member Functions | |
b2ParticleGroup * | GetNext () |
Get the next particle group from the list in b2_World. | |
const b2ParticleGroup * | GetNext () const |
b2ParticleSystem * | GetParticleSystem () |
Get the particle system that holds this particle group. | |
const b2ParticleSystem * | GetParticleSystem () 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 b2Transform & | GetTransform () const |
const b2Vec2 & | GetPosition () 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 |
A group of particles. b2ParticleGroup::CreateParticleGroup creates these.
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.
Whether | to call the world b2DestructionListener for each particle is destroyed. |
|
inline |
Destroy all particles in this group without enabling the destruction callback for destroyed particles. This function is locked during callbacks.
|
inline |
Get the rotational angle of the particle group as a whole. Used only with groups of rigid particles.
Get the world linear velocity of a world point, from the average linear and angular velocities of the particle group.
a | point in world coordinates. |
|
inline |
Get position of the particle group as a whole. Used only with groups of rigid particles.
|
inline |
Get the position of the group's origin and rotation. Used only with groups of rigid particles.