pub struct Plane<S> where
S: EuclideanSpace, {
pub origin: S,
pub normal: Unit<Vector<S>>,
}
Fields
origin: S
normal: Unit<Vector<S>>
Trait Implementations
sourceimpl<S: Clone> Clone for Plane<S> where
S: EuclideanSpace,
impl<S: Clone> Clone for Plane<S> where
S: EuclideanSpace,
sourceimpl<S> Intersection<Line<S>> for Plane<S> where
S: EuclideanSpace,
Line<S>: Intersection<Plane<S>>,
impl<S> Intersection<Line<S>> for Plane<S> where
S: EuclideanSpace,
Line<S>: Intersection<Plane<S>>,
Symmetrical intersection.
type Output = <Line<S> as Intersection<Plane<S>>>::Output
fn intersection(&self, other: &Line<S>) -> Option<Self::Output>
sourceimpl<S> Intersection<Plane<S>> for Line<S> where
S: EuclideanSpace + FiniteDimensional,
<S as FiniteDimensional>::N: Cmp<U2, Output = Greater>,
impl<S> Intersection<Plane<S>> for Line<S> where
S: EuclideanSpace + FiniteDimensional,
<S as FiniteDimensional>::N: Cmp<U2, Output = Greater>,
Intersection of a line and a plane.
type Output = LinePlane<S>
type Output = LinePlane<S>
The time of impact of a point intersection or the line if it lies within the plane.
The time of impact $t$ describes the distance from the line’s origin point at which the intersection occurs.
sourcefn intersection(&self, plane: &Plane<S>) -> Option<Self::Output>
fn intersection(&self, plane: &Plane<S>) -> Option<Self::Output>
Determines if a line intersects a plane at a point or lies within the
plane. Computes the time of impact of a Line
for a point
intersection.
Given a line formed from an origin $P_0$ and a unit direction $\hat{u}$, the point of intersection with the plane is $P_0 + t\hat{u}$.
sourceimpl<S> Intersection<Plane<S>> for Ray<S> where
S: EuclideanSpace,
Plane<S>: Intersection<Ray<S>>,
impl<S> Intersection<Plane<S>> for Ray<S> where
S: EuclideanSpace,
Plane<S>: Intersection<Ray<S>>,
Symmetrical intersection.
type Output = <Plane<S> as Intersection<Ray<S>>>::Output
fn intersection(&self, other: &Plane<S>) -> Option<Self::Output>
sourceimpl<S> Intersection<Ray<S>> for Plane<S> where
S: EuclideanSpace + FiniteDimensional,
<S as FiniteDimensional>::N: Cmp<U2, Output = Greater>,
Scalar<S>: Signed,
impl<S> Intersection<Ray<S>> for Plane<S> where
S: EuclideanSpace + FiniteDimensional,
<S as FiniteDimensional>::N: Cmp<U2, Output = Greater>,
Scalar<S>: Signed,
Intersection of a plane and a ray.
type Output = PlaneRay<S>
type Output = PlaneRay<S>
The time of impact of a point intersection or the ray if it lies within the plane.
The time of impact $t$ describes the distance along the half-line from the ray’s origin at which the intersection occurs.
sourcefn intersection(&self, ray: &Ray<S>) -> Option<Self::Output>
fn intersection(&self, ray: &Ray<S>) -> Option<Self::Output>
Determines if a ray intersects a plane at a point or lies within the
plane. Computes the time of impact of a Ray
for a point
intersection.
Given a ray formed by an origin $P_0$ and a unit direction $\hat{u}$, the point of intersection with the plane is $P_0 + t\hat{u}$.
impl<S> Copy for Plane<S> where
S: EuclideanSpace,
Vector<S>: Copy,
Auto Trait Implementations
impl<S> RefUnwindSafe for Plane<S> where
S: RefUnwindSafe,
<S as EuclideanSpace>::CoordinateSpace: RefUnwindSafe,
impl<S> Send for Plane<S> where
S: Send,
<S as EuclideanSpace>::CoordinateSpace: Send,
impl<S> Sync for Plane<S> where
S: Sync,
<S as EuclideanSpace>::CoordinateSpace: Sync,
impl<S> Unpin for Plane<S> where
S: Unpin,
<S as EuclideanSpace>::CoordinateSpace: Unpin,
impl<S> UnwindSafe for Plane<S> where
S: UnwindSafe,
<S as EuclideanSpace>::CoordinateSpace: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.