gizmo_physics_core/components/
fluid.rs1use gizmo_math::Vec3;
2
3#[derive(Debug, Clone)]
4pub struct FluidSimulation {
5 pub target_density: f32,
6 pub pressure_multiplier: f32,
7 pub viscosity: f32,
8 pub particle_radius: f32,
9 pub bounds_min: Vec3,
10 pub bounds_max: Vec3,
11}
12
13impl Default for FluidSimulation {
14 fn default() -> Self {
15 Self {
16 target_density: 1000.0,
17 pressure_multiplier: 100.0,
18 viscosity: 0.01,
19 particle_radius: 0.1,
20 bounds_min: Vec3::new(-10.0, 0.0, -10.0),
21 bounds_max: Vec3::new(10.0, 10.0, 10.0),
22 }
23 }
24}
25
26gizmo_core::impl_component!(FluidSimulation);