euv-core 0.56.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::*;

/// Convex 3D primitive or hull supported by `GjkEpaSolver3D`.
#[derive(Clone, Debug, PartialEq)]
pub enum ConvexShape3D {
    /// Solid 3D sphere centered at `center` with `radius`.
    Sphere {
        /// World-space sphere center.
        center: Vec3,
        /// Positive sphere radius.
        radius: f32,
    },
    /// Oriented 3D box (OBB) with center, local half-extents, and unit rotation quaternion.
    Box {
        /// World-space box center.
        center: Vec3,
        /// Positive local half-extents along X, Y, and Z.
        half_extents: Vec3,
        /// World orientation quaternion.
        rotation: Quat,
    },
    /// Oriented 3D capsule aligned along its local Y axis `[-half_height, +half_height]`.
    Capsule {
        /// World-space capsule center.
        center: Vec3,
        /// Half-length of the internal cylindrical spine along local Y.
        half_height: f32,
        /// Hemispherical cap and barrel radius.
        radius: f32,
        /// World orientation quaternion.
        rotation: Quat,
    },
    /// Oriented 3D cylinder aligned along its local Y axis `[-half_height, +half_height]`.
    Cylinder {
        /// World-space cylinder center.
        center: Vec3,
        /// Half-height along local Y.
        half_height: f32,
        /// Circular cross-section radius in local XZ.
        radius: f32,
        /// World orientation quaternion.
        rotation: Quat,
    },
    /// Arbitrary convex polyhedron defined by local-space vertices and a world rigid transform.
    ConvexHull {
        /// Local-space convex hull vertices.
        vertices: Vec<Vec3>,
        /// World-space translation offset.
        position: Vec3,
        /// World-space rotation quaternion.
        rotation: Quat,
    },
}

/// Active tracking and cinematic mode of `CameraRig3D`.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum CameraRigMode {
    /// Third-person damped spring-arm follow with obstacle pullback.
    #[default]
    SpringArm,
    /// Smooth spherical yaw/pitch orbit around a target point.
    Orbit,
    /// First-person eye-mounted look controller.
    FirstPerson,
    /// Catmull-Rom cinematic spline rail camera.
    SplineRail,
}