pub struct FluidManager {
pub particles: Vec<FluidParticle>,
pub pools: Vec<FluidPool>,
pub simulator: SPHSimulator,
pub renderer: FluidRenderer,
pub time: f32,
pub fixed_dt: f32,
/* private fields */
}Expand description
Owns all fluid particles and pools. Drives the SPH simulation, handles pool formation/merging, particle lifecycle, and provides render data.
Fields§
§particles: Vec<FluidParticle>All active fluid particles.
pools: Vec<FluidPool>All active fluid pools.
simulator: SPHSimulatorThe SPH simulator.
renderer: FluidRendererThe renderer.
time: f32Accumulated simulation time.
fixed_dt: f32Fixed timestep for SPH (seconds).
Implementations§
Source§impl FluidManager
impl FluidManager
Sourcepub fn particle_count(&self) -> usize
pub fn particle_count(&self) -> usize
Number of active particles.
Sourcepub fn pool_count(&self) -> usize
pub fn pool_count(&self) -> usize
Number of active pools.
Sourcepub fn particle_sprites(&self) -> Vec<FluidSpriteData>
pub fn particle_sprites(&self) -> Vec<FluidSpriteData>
Get all particle render data.
Sourcepub fn pool_sprites(&self) -> Vec<FluidSpriteData>
pub fn pool_sprites(&self) -> Vec<FluidSpriteData>
Get all pool render data.
Sourcepub fn query_effects_at(&self, pos: Vec3) -> Vec<FluidStatusEffect>
pub fn query_effects_at(&self, pos: Vec3) -> Vec<FluidStatusEffect>
Query gameplay effects for an entity at pos.
Sourcepub fn spawn_bleed(&mut self, entity_pos: Vec3, direction: Vec3, count: usize)
pub fn spawn_bleed(&mut self, entity_pos: Vec3, direction: Vec3, count: usize)
Spawn blood drip from a wound.
Sourcepub fn spawn_fire_pool(&mut self, position: Vec3, radius: f32, count: usize)
pub fn spawn_fire_pool(&mut self, position: Vec3, radius: f32, count: usize)
Spawn a fire pool.
Sourcepub fn spawn_ice_spread(&mut self, position: Vec3, radius: f32, count: usize)
pub fn spawn_ice_spread(&mut self, position: Vec3, radius: f32, count: usize)
Spawn ice spread.
Sourcepub fn spawn_healing_fountain(&mut self, position: Vec3, count: usize)
pub fn spawn_healing_fountain(&mut self, position: Vec3, count: usize)
Spawn healing fountain.
Sourcepub fn spawn_ouroboros_flow(
&mut self,
from_pos: Vec3,
to_pos: Vec3,
count: usize,
)
pub fn spawn_ouroboros_flow( &mut self, from_pos: Vec3, to_pos: Vec3, count: usize, )
Spawn Ouroboros dark flow.
Sourcepub fn spawn_necro_crawl(
&mut self,
origin: Vec3,
corpse_positions: &[Vec3],
particles_per_corpse: usize,
)
pub fn spawn_necro_crawl( &mut self, origin: Vec3, corpse_positions: &[Vec3], particles_per_corpse: usize, )
Spawn necro crawl toward corpses.
Sourcepub fn spawn_poison_bubbles(&mut self, position: Vec3, count: usize)
pub fn spawn_poison_bubbles(&mut self, position: Vec3, count: usize)
Spawn poison bubbles.
Sourcepub fn spawn_holy_rise(&mut self, position: Vec3, count: usize)
pub fn spawn_holy_rise(&mut self, position: Vec3, count: usize)
Spawn holy rise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FluidManager
impl RefUnwindSafe for FluidManager
impl Send for FluidManager
impl Sync for FluidManager
impl Unpin for FluidManager
impl UnsafeUnpin for FluidManager
impl UnwindSafe for FluidManager
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.