Struct libliquidfun_sys::box2d::ffi::b2ParticleGroup
source · #[repr(C, align(8))]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 unsafe fn SetUserData(self: Pin<&mut b2ParticleGroup>, data: *mut c_void)
pub unsafe fn SetUserData(self: Pin<&mut b2ParticleGroup>, data: *mut c_void)
Set the user data. Use this to store your application specific data.
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.
source§impl b2ParticleGroup
impl b2ParticleGroup
pub fn GetParticleSystem1(&self) -> *const b2ParticleSystem
source§impl b2ParticleGroup
impl b2ParticleGroup
sourcepub fn GetBufferIndex(&self) -> c_int
pub fn GetBufferIndex(&self) -> c_int
Get the offset of this group in the global particle buffer
source§impl b2ParticleGroup
impl b2ParticleGroup
sourcepub fn ContainsParticle(&self, index: c_int) -> bool
pub fn ContainsParticle(&self, index: c_int) -> bool
Does this group contain the particle.
source§impl b2ParticleGroup
impl b2ParticleGroup
sourcepub fn GetGroupFlags(&self) -> c_uint
pub fn GetGroupFlags(&self) -> c_uint
Get the construction flags for the group.
source§impl b2ParticleGroup
impl b2ParticleGroup
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.
source§impl b2ParticleGroup
impl b2ParticleGroup
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.