pub struct ParticleEmitterSet2 { /* private fields */ }
Expand description
§2-D particle-based emitter set.
Implementations§
Source§impl ParticleEmitterSet2
impl ParticleEmitterSet2
Sourcepub fn new_default() -> ParticleEmitterSet2
pub fn new_default() -> ParticleEmitterSet2
Constructs an emitter.
Sourcepub fn new(emitters: Vec<ParticleEmitter2Ptr>) -> ParticleEmitterSet2
pub fn new(emitters: Vec<ParticleEmitter2Ptr>) -> ParticleEmitterSet2
Constructs an emitter with sub-emitters.
Sourcepub fn add_emitter(&mut self, emitter: ParticleEmitter2Ptr)
pub fn add_emitter(&mut self, emitter: ParticleEmitter2Ptr)
Adds sub-emitter.
Sourcepub fn set_on_begin_update_callback(&mut self, callback: OnBeginUpdateCallback)
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
impl ParticleEmitter2 for ParticleEmitterSet2
Source§fn update(
&mut self,
current_time_in_seconds: f64,
time_interval_in_seconds: f64,
)
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)
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,
)
fn on_update( &mut self, current_time_in_seconds: f64, time_interval_in_seconds: f64, )
Called when ParticleEmitter3::update is executed.
fn view(&self) -> &ParticleEmitter2Data
fn view_mut(&mut self) -> &mut ParticleEmitter2Data
Source§fn target(&self) -> &Option<ParticleSystemData2Ptr>
fn target(&self) -> &Option<ParticleSystemData2Ptr>
Returns the target particle system to emit.
Source§fn set_target(&mut self, particles: ParticleSystemData2Ptr)
fn set_target(&mut self, particles: ParticleSystemData2Ptr)
Sets the target particle system to emit.
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns true if the emitter is enabled.
Source§fn set_is_enabled(&mut self, enabled: bool)
fn set_is_enabled(&mut self, enabled: bool)
Sets true/false to enable/disable the emitter.
Auto Trait Implementations§
impl Freeze for ParticleEmitterSet2
impl RefUnwindSafe for ParticleEmitterSet2
impl Send for ParticleEmitterSet2
impl Sync for ParticleEmitterSet2
impl Unpin for ParticleEmitterSet2
impl UnwindSafe for ParticleEmitterSet2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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