[][src]Struct plane_split::Plane

pub struct Plane<T, U> {
    pub normal: TypedVector3D<T, U>,
    pub offset: T,
}

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

Normalized vector perpendicular to the plane.

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]

Construct a new plane from unnormalized equation.

Check if this plane contains another one.

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.

Compute the distance across the line to the plane plane, starting from the line origin.

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.

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.

Compute the line of intersection with another plane.

Trait Implementations

impl<T: PartialEq, U: PartialEq> PartialEq<Plane<T, U>> for Plane<T, U>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Clone, U> Clone for Plane<T, U>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug, U: Debug> Debug for Plane<T, U>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

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

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

🔬 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]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 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