[−][src]Struct plane_split::Plane
An infinite plane in 3D space, defined by equation: dot(v, normal) + offset = 0 When used for plane splitting, it's defining a hemisphere with equation "dot(v, normal) + offset > 0".
Fields
normal: Vector3D<T, U>
Normalized vector perpendicular to the plane.
offset: T
Constant offset from the normal plane, specified in the direction opposite to the normal.
Implementations
impl<T: Copy + Zero + One + Float + ApproxEq<T> + Sub<T, Output = T> + Add<T, Output = T> + Mul<T, Output = T> + Div<T, Output = T>, U> Plane<T, U>
[src]
pub fn from_unnormalized(
normal: Vector3D<T, U>,
offset: T
) -> Result<Option<Self>, NegativeHemisphereError>
[src]
normal: Vector3D<T, U>,
offset: T
) -> Result<Option<Self>, NegativeHemisphereError>
Construct a new plane from unnormalized equation.
pub fn contains(&self, other: &Self) -> bool
[src]
Check if this plane contains another one.
pub fn signed_distance_to(&self, point: &Point3D<T, U>) -> T
[src]
Return the signed distance from this plane to a point. The distance is negative if the point is on the other side of the plane from the direction of the normal.
pub fn distance_to_line(&self, line: &Line<T, U>) -> T where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
Compute the distance across the line to the plane plane, starting from the line origin.
pub fn signed_distance_sum_to<A>(&self, poly: &Polygon<T, U, A>) -> T
[src]
Compute the sum of signed distances to each of the points
of another plane. Useful to know the relation of a plane that
is a product of a split, and we know it doesn't intersect self
.
pub fn are_outside(&self, points: &[Point3D<T, U>]) -> bool
[src]
Check if a convex shape defined by a set of points is completely outside of this plane. Merely touching the surface is not considered an intersection.
pub fn intersect(&self, other: &Self) -> Option<Line<T, U>>
[src]
Compute the line of intersection with another plane.
Trait Implementations
impl<T: Clone, U> Clone for Plane<T, U>
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug, U: Debug> Debug for Plane<T, U>
[src]
impl<T: PartialEq, U: PartialEq> PartialEq<Plane<T, U>> for Plane<T, U>
[src]
pub fn eq(&self, other: &Plane<T, U>) -> bool
[src]
pub fn ne(&self, other: &Plane<T, U>) -> bool
[src]
impl<T, U> StructuralPartialEq for Plane<T, U>
[src]
Auto Trait Implementations
impl<T, U> RefUnwindSafe for Plane<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Plane<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for Plane<T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
impl<T, U> Unpin for Plane<T, U> where
T: Unpin,
U: Unpin,
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for Plane<T, U> where
T: UnwindSafe,
U: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,