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