pub struct Plane<S: Scalar> {
pub point: Vector3<S>,
pub normal: Vector3<S>,
}Expand description
A plane: through point, normal to the unit vector normal.
Fields§
§point: Vector3<S>§normal: Vector3<S>Implementations§
Source§impl<S: Scalar> Plane<S>
impl<S: Scalar> Plane<S>
Sourcepub fn try_new(point: Vector3<S>, normal: Vector3<S>) -> GeopResult<Self>
pub fn try_new(point: Vector3<S>, normal: Vector3<S>) -> GeopResult<Self>
The plane through point normal to normal, which need not be unit
length but must not be zero.
Sourcepub fn signed_distance(&self, p: &Vector3<S>) -> S
pub fn signed_distance(&self, p: &Vector3<S>) -> S
How far p lies in front of the plane (along the normal); negative
behind it.
Sourcepub fn project(&self, p: &Vector3<S>) -> Vector3<S>
pub fn project(&self, p: &Vector3<S>) -> Vector3<S>
The point of the plane closest to p: the foot of the perpendicular
from p.
Sourcepub fn intersect_axis(&self, axis: &Axis<S>) -> GeopResult<Vector3<S>>
pub fn intersect_axis(&self, axis: &Axis<S>) -> GeopResult<Vector3<S>>
Where axis pierces the plane. Fails if it could run parallel to it.
Sourcepub fn intersect_plane(&self, other: &Plane<S>) -> GeopResult<Axis<S>>
pub fn intersect_plane(&self, other: &Plane<S>) -> GeopResult<Axis<S>>
The line the two planes meet in, running along self.normal x other.normal. Fails if they could be parallel.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Plane<S>where
S: Freeze,
impl<S> RefUnwindSafe for Plane<S>where
S: RefUnwindSafe,
impl<S> Send for Plane<S>
impl<S> Sync for Plane<S>
impl<S> Unpin for Plane<S>where
S: Unpin,
impl<S> UnsafeUnpin for Plane<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Plane<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more