pub struct FluidConfig {
pub rest_density: Fix128,
pub kernel_radius: Fix128,
pub iterations: usize,
pub substeps: usize,
pub gravity: Vec3Fix,
pub damping: Fix128,
pub viscosity: Fix128,
pub vorticity_strength: Fix128,
pub surface_tension: Fix128,
pub particle_mass: Fix128,
pub relaxation: Fix128,
}Expand description
Fluid simulation configuration
Fields§
§rest_density: Fix128Rest density (kg/m^3)
kernel_radius: Fix128Smoothing kernel radius
iterations: usizeNumber of solver iterations
substeps: usizeNumber of substeps
gravity: Vec3FixGravity vector
damping: Fix128Velocity retention per frame (step() call), applied once per frame
since 1.2.0 (per substep before, which made the result depend on substeps)
viscosity: Fix128Viscosity coefficient (XSPH)
vorticity_strength: Fix128Vorticity confinement strength ε (Δv = ε · dt · N × ω, PBF §5)
surface_tension: Fix128Surface tension / cohesion coefficient κ
(Δv_i = κ · dt · Σ_j (m_j/ρ₀) (x_j − x_i)/r · W_ij)
particle_mass: Fix128Particle mass
relaxation: Fix128Constraint relaxation parameter
Trait Implementations§
Source§impl Clone for FluidConfig
impl Clone for FluidConfig
impl Copy for FluidConfig
Source§impl Debug for FluidConfig
impl Debug for FluidConfig
Source§impl Default for FluidConfig
impl Default for FluidConfig
impl Eq for FluidConfig
Source§impl PartialEq for FluidConfig
impl PartialEq for FluidConfig
impl StructuralPartialEq for FluidConfig
Auto Trait Implementations§
impl Freeze for FluidConfig
impl RefUnwindSafe for FluidConfig
impl Send for FluidConfig
impl Sync for FluidConfig
impl Unpin for FluidConfig
impl UnsafeUnpin for FluidConfig
impl UnwindSafe for FluidConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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