Struct ParticleEmitterSet2

Source
pub struct ParticleEmitterSet2 { /* private fields */ }
Expand description

§2-D particle-based emitter set.

Implementations§

Source§

impl ParticleEmitterSet2

Source

pub fn new_default() -> ParticleEmitterSet2

Constructs an emitter.

Source

pub fn new(emitters: Vec<ParticleEmitter2Ptr>) -> ParticleEmitterSet2

Constructs an emitter with sub-emitters.

Source

pub fn add_emitter(&mut self, emitter: ParticleEmitter2Ptr)

Adds sub-emitter.

Source

pub fn set_on_begin_update_callback(&mut self, callback: OnBeginUpdateCallback)

\brief Sets the callback function to be called when ParticleEmitter2::update function is invoked.

The callback function takes current simulation time in seconds unit. Use this callback to track any motion or state changes related to this emitter.

  • parameter: callback The callback function.

Trait Implementations§

Source§

impl ParticleEmitter2 for ParticleEmitterSet2

Source§

fn update( &mut self, current_time_in_seconds: f64, time_interval_in_seconds: f64, )

Updates the emitter state from \p current_time_in_seconds to the following time-step.
Source§

fn on_set_target(&self, particles: ParticleSystemData2Ptr)

Called when ParticleEmitter3::set_target is executed.
Source§

fn on_update( &mut self, current_time_in_seconds: f64, time_interval_in_seconds: f64, )

Called when ParticleEmitter3::update is executed.
Source§

fn view(&self) -> &ParticleEmitter2Data

Source§

fn view_mut(&mut self) -> &mut ParticleEmitter2Data

Source§

fn target(&self) -> &Option<ParticleSystemData2Ptr>

Returns the target particle system to emit.
Source§

fn set_target(&mut self, particles: ParticleSystemData2Ptr)

Sets the target particle system to emit.
Source§

fn is_enabled(&self) -> bool

Returns true if the emitter is enabled.
Source§

fn set_is_enabled(&mut self, enabled: bool)

Sets true/false to enable/disable the emitter.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V