pub struct b2ParticleGroup { /* private fields */ }Expand description
A group of particles. b2ParticleGroup::CreateParticleGroup creates these.
Implementations§
Source§impl b2ParticleGroup
impl b2ParticleGroup
Sourcepub fn GetNext(self: Pin<&mut b2ParticleGroup>) -> *mut b2ParticleGroup
pub fn GetNext(self: Pin<&mut b2ParticleGroup>) -> *mut b2ParticleGroup
Get the next particle group from the list in b2_World.
pub fn GetNext1(self: &b2ParticleGroup) -> *const b2ParticleGroup
Sourcepub fn GetParticleCount(self: &b2ParticleGroup) -> c_int
pub fn GetParticleCount(self: &b2ParticleGroup) -> c_int
Get the number of particles.
Sourcepub fn GetAllParticleFlags(self: &b2ParticleGroup) -> c_uint
pub fn GetAllParticleFlags(self: &b2ParticleGroup) -> c_uint
Get the logical sum of particle flags.
Sourcepub fn SetGroupFlags(self: Pin<&mut b2ParticleGroup>, flags: c_uint)
pub fn SetGroupFlags(self: Pin<&mut b2ParticleGroup>, flags: c_uint)
Set the construction flags for the group.
Sourcepub fn GetMass(self: &b2ParticleGroup) -> f32
pub fn GetMass(self: &b2ParticleGroup) -> f32
Get the total mass of the group: the sum of all particles in it.
Sourcepub fn GetInertia(self: &b2ParticleGroup) -> f32
pub fn GetInertia(self: &b2ParticleGroup) -> f32
Get the moment of inertia for the group.
Sourcepub fn GetCenter(self: &b2ParticleGroup) -> b2Vec2
pub fn GetCenter(self: &b2ParticleGroup) -> b2Vec2
Get the center of gravity for the group.
Sourcepub fn GetLinearVelocity(self: &b2ParticleGroup) -> b2Vec2
pub fn GetLinearVelocity(self: &b2ParticleGroup) -> b2Vec2
Get the linear velocity of the group.
Sourcepub fn GetAngularVelocity(self: &b2ParticleGroup) -> f32
pub fn GetAngularVelocity(self: &b2ParticleGroup) -> f32
Get the angular velocity of the group.
Sourcepub fn GetTransform(self: &b2ParticleGroup) -> &b2Transform
pub fn GetTransform(self: &b2ParticleGroup) -> &b2Transform
Get the position of the group’s origin and rotation. Used only with groups of rigid particles.
Sourcepub fn GetPosition(self: &b2ParticleGroup) -> &b2Vec2
pub fn GetPosition(self: &b2ParticleGroup) -> &b2Vec2
Get position of the particle group as a whole. Used only with groups of rigid particles.
Sourcepub fn GetAngle(self: &b2ParticleGroup) -> f32
pub fn GetAngle(self: &b2ParticleGroup) -> f32
Get the rotational angle of the particle group as a whole. Used only with groups of rigid particles.
Sourcepub fn GetLinearVelocityFromWorldPoint(
self: &b2ParticleGroup,
worldPoint: &b2Vec2,
) -> b2Vec2
pub fn GetLinearVelocityFromWorldPoint( self: &b2ParticleGroup, worldPoint: &b2Vec2, ) -> b2Vec2
Get the world linear velocity of a world point, from the average linear and angular velocities of the particle group. @param a point in world coordinates. @return the world velocity of a point.
Sourcepub fn GetUserData(self: &b2ParticleGroup) -> *mut c_void
pub fn GetUserData(self: &b2ParticleGroup) -> *mut c_void
Get the user data pointer that was provided in the group definition.
Sourcepub fn ApplyForce(self: Pin<&mut b2ParticleGroup>, force: &b2Vec2)
pub fn ApplyForce(self: Pin<&mut b2ParticleGroup>, force: &b2Vec2)
Call b2ParticleSystem::ApplyForce for every particle in the group.
Sourcepub fn ApplyLinearImpulse(self: Pin<&mut b2ParticleGroup>, impulse: &b2Vec2)
pub fn ApplyLinearImpulse(self: Pin<&mut b2ParticleGroup>, impulse: &b2Vec2)
Call b2ParticleSystem::ApplyLinearImpulse for every particle in the group.
Source§impl b2ParticleGroup
impl b2ParticleGroup
Sourcepub fn GetParticleSystem(self: Pin<&mut Self>) -> *mut b2ParticleSystem
pub fn GetParticleSystem(self: Pin<&mut Self>) -> *mut b2ParticleSystem
Get the particle system that holds this particle group.
pub fn GetParticleSystem1(&self) -> *const b2ParticleSystem
Sourcepub fn GetBufferIndex(&self) -> c_int
pub fn GetBufferIndex(&self) -> c_int
Get the offset of this group in the global particle buffer
Sourcepub fn ContainsParticle(&self, index: c_int) -> bool
pub fn ContainsParticle(&self, index: c_int) -> bool
Does this group contain the particle.
Sourcepub fn GetGroupFlags(&self) -> c_uint
pub fn GetGroupFlags(&self) -> c_uint
Get the construction flags for the group.
Sourcepub unsafe fn SetUserData(self: Pin<&mut Self>, data: *mut c_void)
pub unsafe fn SetUserData(self: Pin<&mut Self>, data: *mut c_void)
Set the user data. Use this to store your application specific data.
Sourcepub fn DestroyParticles(self: Pin<&mut Self>, callDestructionListener: bool)
pub fn DestroyParticles(self: Pin<&mut Self>, callDestructionListener: bool)
Destroy all the particles in this group. This function is locked during callbacks. @param Whether to call the world b2DestructionListener for each particle is destroyed. @warning This function is locked during callbacks.
Sourcepub fn DestroyParticles1(self: Pin<&mut Self>)
pub fn DestroyParticles1(self: Pin<&mut Self>)
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.
Trait Implementations§
Source§impl CopyNew for b2ParticleGroup
impl CopyNew for b2ParticleGroup
Source§unsafe fn copy_new(
other: &b2ParticleGroup,
this: Pin<&mut MaybeUninit<b2ParticleGroup>>,
)
unsafe fn copy_new( other: &b2ParticleGroup, this: Pin<&mut MaybeUninit<b2ParticleGroup>>, )
Synthesized copy constructor.