Struct plane_split::Polygon [] [src]

pub struct Polygon<T, U> {
    pub points: [TypedPoint3D<T, U>; 4],
    pub plane: Plane<T, U>,
    pub anchor: usize,
}

A convex polygon with 4 points lying on a plane.

Fields

Points making the polygon.

A plane describing polygon orientation.

A simple anchoring index to allow association of the produced split polygons with the original one.

Methods

impl<T, U> Polygon<T, U> where
    T: Copy + Debug + ApproxEq<T> + Sub<T, Output = T> + Add<T, Output = T> + Mul<T, Output = T> + Div<T, Output = T> + Zero + One + Float,
    U: Debug
[src]

[src]

Construct a polygon from points that are already transformed.

[src]

Construct a polygon from a rectangle with 3D transform.

[src]

Bring a point into the local coordinate space, returning the 2D normalized coordinates.

[src]

Check if all the points are indeed placed on the plane defined by the normal and offset, and the winding order is consistent.

[src]

Check if this polygon contains another one.

[src]

Project this polygon onto a 3D vector, returning a line projection. Note: we can think of it as a projection to a ray placed at the origin.

[src]

Compute the line of intersection with an infinite plane.

[src]

Compute the line of intersection with another polygon.

[src]

Split the polygon along the specified Line. Will do nothing if the line doesn't belong to the polygon plane.

Trait Implementations

impl<T, U> BspPlane for Polygon<T, U> where
    T: Copy + Debug + ApproxEq<T> + Sub<T, Output = T> + Add<T, Output = T> + Mul<T, Output = T> + Div<T, Output = T> + Zero + One + Float,
    U: Debug
[src]

[src]

Try to cut a different plane by this one.

[src]

Check if a different plane is aligned in the same direction as this one. Read more

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

[src]

Formats the value using the given formatter. Read more

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

[src]

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

[src]

This method tests for !=.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T, U> Send for Polygon<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for Polygon<T, U> where
    T: Sync,
    U: Sync