[][src]Struct salva3d::LiquidWorld

pub struct LiquidWorld<N: RealField> { /* fields omitted */ }

The physics world for simulating fluids with boundaries.

Methods

impl<N: RealField> LiquidWorld<N>[src]

pub fn new(particle_radius: N, smoothing_factor: N) -> Self[src]

Initialize a new liquid world.

Parameters

  • particle_radius: the radius of every particle on this world.
  • smoothing_factor: the smoothing factor used to compute the SPH kernel radius. The kernel radius will be computed as `particle_radius * smoothing_factor * 2.0.

pub fn step(&mut self, dt: N, gravity: &Vector<N>)[src]

Advances the simulation by dt milliseconds.

All the fluid particles will be affected by an acceleration equal to gravity.

pub fn add_fluid(&mut self, fluid: Fluid<N>) -> FluidHandle[src]

Add a fluid to the liquid world.

pub fn add_boundary(&mut self, boundary: Boundary<N>) -> BoundaryHandle[src]

Add a boundary to the liquid world.

pub fn fluids(&self) -> &[Fluid<N>][src]

The set of fluids on this liquid world.

pub fn boundaries(&self) -> &[Boundary<N>][src]

The set of boundaries on this liquid world.

pub fn h(&self) -> N[src]

The SPH kernel radius.

pub fn particle_radius(&self) -> N[src]

The radius of every particle on this liquid world.

Auto Trait Implementations

impl<N> Send for LiquidWorld<N> where
    N: Scalar

impl<N> Sync for LiquidWorld<N> where
    N: Scalar

impl<N> Unpin for LiquidWorld<N> where
    N: Scalar + Unpin

impl<N> UnwindSafe for LiquidWorld<N> where
    N: Scalar + UnwindSafe

impl<N> RefUnwindSafe for LiquidWorld<N> where
    N: RefUnwindSafe + Scalar

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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