pub struct Plane {
pub point: Vector3,
pub normal: Vector3,
}Expand description
A plane: through point, normal to the unit vector normal.
Fields§
§point: Vector3§normal: Vector3Implementations§
Source§impl Plane
impl Plane
Sourcepub fn try_new(point: Vector3, normal: Vector3) -> GeopResult<Self>
pub fn try_new(point: Vector3, normal: Vector3) -> 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) -> Scalar
pub fn signed_distance(&self, p: &Vector3) -> Scalar
How far p lies in front of the plane (along the normal); negative
behind it.
Sourcepub fn project(&self, p: &Vector3) -> Vector3
pub fn project(&self, p: &Vector3) -> Vector3
The point of the plane closest to p: the foot of the perpendicular
from p.
Sourcepub fn intersect_axis(&self, axis: &Axis) -> GeopResult<Vector3>
pub fn intersect_axis(&self, axis: &Axis) -> GeopResult<Vector3>
Where axis pierces the plane. Fails if it could run parallel to it.
Sourcepub fn intersect_plane(&self, other: &Plane) -> GeopResult<Axis>
pub fn intersect_plane(&self, other: &Plane) -> GeopResult<Axis>
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 Freeze for Plane
impl RefUnwindSafe for Plane
impl Send for Plane
impl Sync for Plane
impl Unpin for Plane
impl UnsafeUnpin for Plane
impl UnwindSafe for Plane
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