euv-core 0.57.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Dimensionality mode for `SphLiquidSolver3D` selecting 2D or 3D kernels and spatial hashing.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum FluidDomainMode {
    /// Planar 2D liquid simulation in the X-Y plane (`z = 0`) using normalized 2D SPH kernels.
    Dim2,
    /// Full volumetric 3D liquid simulation using normalized 3D SPH kernels.
    #[default]
    Dim3,
}

/// Composable solid boundary or obstacle geometry supported by `SphSolidCollider`.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SphColliderShape {
    /// Axis-aligned box acting as an enclosing vessel (`inward = true`) or solid obstacle (`inward = false`).
    Box {
        /// World-space box center.
        center: Vec3,
        /// Positive half-extents along `(X, Y, Z)`.
        half_extents: Vec3,
        /// `true` confines fluid inside the box; `false` pushes fluid outside the box.
        inward: bool,
    },
    /// Spherical vessel (`inward = true`) or solid obstacle (`inward = false`).
    Sphere {
        /// World-space sphere center.
        center: Vec3,
        /// Sphere radius in meters.
        radius: f32,
        /// `true` confines fluid inside the sphere; `false` pushes fluid outside.
        inward: bool,
    },
    /// Solid capsule obstacle defined by segment endpoints and radius.
    Capsule {
        /// First segment endpoint in world space.
        point_a: Vec3,
        /// Second segment endpoint in world space.
        point_b: Vec3,
        /// Capsule tube and hemispherical cap radius in meters.
        radius: f32,
    },
    /// Vertical Y-axis cylinder acting as a tank (`inward = true`) or pillar (`inward = false`).
    Cylinder {
        /// World-space cylinder center.
        center: Vec3,
        /// Horizontal cross-section radius in meters.
        radius: f32,
        /// Half-height along world Y in meters.
        half_height: f32,
        /// `true` confines fluid inside the cylinder; `false` excludes fluid from its interior.
        inward: bool,
    },
    /// Infinite half-space solid plane retaining particles on the `+normal` side.
    Plane {
        /// Reference point lying on the plane.
        point: Vec3,
        /// Outward unit normal pointing into the fluid region.
        normal: Vec3,
    },
    /// Enclosed moving rectangular vessel imparting wall velocity and friction to contained fluid.
    MovingContainer {
        /// Current world-space box center.
        center: Vec3,
        /// Positive interior half-extents along `(X, Y, Z)`.
        half_extents: Vec3,
        /// Current linear wall velocity in meters per second.
        linear_velocity: Vec3,
    },
}