ncollide3d/shape/
plane.rs
1use crate::math::Vector;
3use na::{RealField, Unit};
4
5#[derive(PartialEq, Debug, Clone)]
7#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8pub struct Plane<N: RealField + Copy> {
9 pub normal: Unit<Vector<N>>,
11}
12
13impl<N: RealField + Copy> Plane<N> {
14 #[inline]
16 pub fn new(normal: Unit<Vector<N>>) -> Plane<N> {
17 Plane { normal }
18 }
19
20 #[inline]
22 #[deprecated(note = "use the `self.normal` public field directly.")]
23 pub fn normal(&self) -> &Unit<Vector<N>> {
24 &self.normal
25 }
26}