1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
//! Oriented bounding cylinder

use cgmath::Point3;
use cgmath::Vector3;

/// Bounding cylinder
#[derive(Copy, Clone, PartialEq, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Cylinder<S> {
    /// Center point
    pub center: Point3<S>,
    /// Axis the cylinder is aligned with
    pub axis: Vector3<S>,
    /// Radius of the cylinder
    pub radius: S,
}