pub enum HalfSpaces {
Below {
normal: Vector,
at: Point,
},
Every(Vec<HalfSpaces>),
Any(Vec<HalfSpaces>),
}Expand description
A region of space bounded by planes, as a tree of half-spaces.
Variants§
Below
The points on the side of the plane through at that normal
points away from: a point’s height is normal · (p - at), with
normal of unit length.
Every(Vec<HalfSpaces>)
The points inside every piece: a height the greatest of the pieces’.
Any(Vec<HalfSpaces>)
The points inside any piece: a height the least of the pieces’.
Implementations§
Source§impl HalfSpaces
impl HalfSpaces
Sourcepub fn height(&self, p: Point) -> (f64, Vector)
pub fn height(&self, p: Point) -> (f64, Vector)
How far p stands past the region (negative inside), and the
outward normal of the plane that decides it.
Sourcepub fn bound_over(&self, hull: &[Point]) -> f64
pub fn bound_over(&self, hull: &[Point]) -> f64
A bound on the height over the convex hull of hull: exact for a
plane and for the greatest of pieces, at least the least of pieces’
heights for the least.
Trait Implementations§
Source§impl Clone for HalfSpaces
impl Clone for HalfSpaces
Source§impl Debug for HalfSpaces
impl Debug for HalfSpaces
Source§impl PartialEq for HalfSpaces
impl PartialEq for HalfSpaces
impl StructuralPartialEq for HalfSpaces
Auto Trait Implementations§
impl Freeze for HalfSpaces
impl RefUnwindSafe for HalfSpaces
impl Send for HalfSpaces
impl Sync for HalfSpaces
impl Unpin for HalfSpaces
impl UnsafeUnpin for HalfSpaces
impl UnwindSafe for HalfSpaces
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.