#[repr(C, align(8))]
pub struct b2ParticleGroup { /* private fields */ }
Expand description

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

Implementations§

source§

impl b2ParticleGroup

source

pub fn GetNext(self: Pin<&mut b2ParticleGroup>) -> *mut b2ParticleGroup

Get the next particle group from the list in b2_World.

source

pub fn GetNext1(self: &b2ParticleGroup) -> *const b2ParticleGroup

source

pub fn GetParticleCount(self: &b2ParticleGroup) -> c_int

Get the number of particles.

source

pub fn GetAllParticleFlags(self: &b2ParticleGroup) -> c_uint

Get the logical sum of particle flags.

source

pub fn SetGroupFlags(self: Pin<&mut b2ParticleGroup>, flags: c_uint)

Set the construction flags for the group.

source

pub fn GetMass(self: &b2ParticleGroup) -> f32

Get the total mass of the group: the sum of all particles in it.

source

pub fn GetInertia(self: &b2ParticleGroup) -> f32

Get the moment of inertia for the group.

source

pub fn GetCenter(self: &b2ParticleGroup) -> b2Vec2

Get the center of gravity for the group.

source

pub fn GetLinearVelocity(self: &b2ParticleGroup) -> b2Vec2

Get the linear velocity of the group.

source

pub fn GetAngularVelocity(self: &b2ParticleGroup) -> f32

Get the angular velocity of the group.

source

pub fn GetTransform(self: &b2ParticleGroup) -> &b2Transform

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

source

pub fn GetPosition(self: &b2ParticleGroup) -> &b2Vec2

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

source

pub fn GetAngle(self: &b2ParticleGroup) -> f32

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

source

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.

source

pub fn GetUserData(self: &b2ParticleGroup) -> *mut c_void

Get the user data pointer that was provided in the group definition.

source

pub unsafe fn SetUserData(self: Pin<&mut b2ParticleGroup>, data: *mut c_void)

Set the user data. Use this to store your application specific data.

source

pub fn ApplyForce(self: Pin<&mut b2ParticleGroup>, force: &b2Vec2)

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

source

pub fn ApplyLinearImpulse(self: Pin<&mut b2ParticleGroup>, impulse: &b2Vec2)

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

source§

impl b2ParticleGroup

source

pub fn GetParticleSystem(self: Pin<&mut Self>) -> *mut b2ParticleSystem

Get the particle system that holds this particle group.

source§

impl b2ParticleGroup

source§

impl b2ParticleGroup

source

pub fn GetBufferIndex(&self) -> c_int

Get the offset of this group in the global particle buffer

source§

impl b2ParticleGroup

source

pub fn ContainsParticle(&self, index: c_int) -> bool

Does this group contain the particle.

source§

impl b2ParticleGroup

source

pub fn GetGroupFlags(&self) -> c_uint

Get the construction flags for the group.

source§

impl b2ParticleGroup

source

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

source

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

source§

unsafe fn copy_new( other: &b2ParticleGroup, this: Pin<&mut MaybeUninit<b2ParticleGroup>> )

Synthesized copy constructor.

source§

impl ExternType for b2ParticleGroup

§

type Id = (b, _2, P, a, r, t, i, c, l, e, G, r, o, u, p)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Opaque

source§

impl MakeCppStorage for b2ParticleGroup

source§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2ParticleGroup

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
source§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2ParticleGroup)

Frees a C++ allocation which has not yet had a constructor called. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.