oxiphysics-collision 0.1.2

Collision detection algorithms for the OxiPhysics engine
Documentation
//! Auto-generated module
//!
//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)

use crate::types::Contact;

/// Precise cylinder-cylinder contact test with mode detection.
///
/// Detects three contact modes:
/// 1. End-cap vs end-cap
/// 2. Side vs side (parallel axes)
/// 3. Side vs end-cap (crossing axes)
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum CylinderContactMode {
    /// Two side surfaces are closest.
    SideToSide,
    /// An end-cap of one cylinder is closest to the side of the other.
    CapToSide,
    /// Two end-caps are closest.
    CapToCap,
    /// Axes are parallel; side-to-side with full overlap.
    Parallel,
}
/// Result of a precise cylinder-cylinder contact query.
#[derive(Debug, Clone)]
pub struct CylinderContactResult {
    /// Contact information (if any).
    pub contact: Option<Contact>,
    /// Contact mode detected.
    pub mode: CylinderContactMode,
}