Struct plane_split::Plane
[−]
[src]
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
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]
pub fn contains(&self, other: &Self) -> bool[src]
Check if this plane contains another one.
pub fn signed_distance_to(&self, point: &TypedPoint3D<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(&self, poly: &Polygon<T, U>) -> 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: &[TypedPoint3D<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: Debug, U: Debug> Debug for Plane<T, U>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<T: PartialEq, U: PartialEq> PartialEq for Plane<T, U>[src]
fn eq(&self, __arg_0: &Plane<T, U>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Plane<T, U>) -> bool[src]
This method tests for !=.