[−][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: TypedVector3D<T, U>
Normalized vector perpendicular to the plane.
offset: T
Constant offset from the normal plane, specified in the direction opposite to the normal.
Methods
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]
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>pub fn from_unnormalized(
normal: TypedVector3D<T, U>,
offset: T
) -> Result<Option<Self>, NegativeHemisphereError>[src]
pub fn from_unnormalized(
normal: TypedVector3D<T, U>,
offset: T
) -> Result<Option<Self>, NegativeHemisphereError>Construct a new plane from unnormalized equation.
pub fn contains(&self, other: &Self) -> bool[src]
pub fn contains(&self, other: &Self) -> boolCheck if this plane contains another one.
pub fn signed_distance_to(&self, point: &TypedPoint3D<T, U>) -> T[src]
pub fn signed_distance_to(&self, point: &TypedPoint3D<T, U>) -> TReturn 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]
pub fn distance_to_line(&self, line: &Line<T, U>) -> T where
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(&self, poly: &Polygon<T, U>) -> T[src]
pub fn signed_distance_sum_to(&self, poly: &Polygon<T, U>) -> TCompute 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: &[TypedPoint3D<T, U>]) -> bool[src]
pub fn are_outside(&self, points: &[TypedPoint3D<T, U>]) -> boolCheck 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]
pub fn intersect(&self, other: &Self) -> Option<Line<T, U>>Compute the line of intersection with another plane.
Trait Implementations
impl<T: PartialEq, U: PartialEq> PartialEq<Plane<T, U>> for Plane<T, U>[src]
impl<T: PartialEq, U: PartialEq> PartialEq<Plane<T, U>> for Plane<T, U>fn eq(&self, other: &Plane<T, U>) -> bool[src]
fn eq(&self, other: &Plane<T, U>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Plane<T, U>) -> bool[src]
fn ne(&self, other: &Plane<T, U>) -> boolThis method tests for !=.
impl<T: Clone, U> Clone for Plane<T, U>[src]
impl<T: Clone, U> Clone for Plane<T, U>fn clone(&self) -> Self[src]
fn clone(&self) -> SelfReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T: Debug, U: Debug> Debug for Plane<T, U>[src]
impl<T: Debug, U: Debug> Debug for Plane<T, U>Auto Trait Implementations
impl<T, U> Send for Plane<T, U> where
T: Send,
U: Send,
impl<T, U> Send for Plane<T, U> where
T: Send,
U: Send, impl<T, U> Sync for Plane<T, U> where
T: Sync,
U: Sync,
impl<T, U> Sync for Plane<T, U> where
T: Sync,
U: Sync, Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more