pub enum PolyhedralCone<N: Real> {
Full,
Empty,
HalfLine(Unit<Vector<N>>),
HalfSpace(Unit<Vector<N>>),
OrthogonalSubspace(Unit<Vector<N>>),
Span([Unit<Vector<N>>; 2]),
}
Expand description
A convex cone with polyhedral faces and its apex at the origin.
A polyhedral cone is a set of half-lines forming a convex set. It is usually used to bound a set of directions like normals and tangents. It must be convex and can be generated from a finite set of vectors.
Variants§
Full
A polyhedral cone which is the whole space.
Empty
An empty cone containing only the zero vector.
HalfLine(Unit<Vector<N>>)
The half-line starting at the origin, pointing toward the given diretion.
HalfSpace(Unit<Vector<N>>)
The half-space which boundary has the given diretion as normal.
OrthogonalSubspace(Unit<Vector<N>>)
The subspace orthogonal to the given diretion.
Span([Unit<Vector<N>>; 2])
All the positive linear combinations of the given set of vectors.
Implementations§
source§impl<N: Real> PolyhedralCone<N>
impl<N: Real> PolyhedralCone<N>
sourcepub fn unwrap_half_line(&self) -> Unit<Vector<N>>
pub fn unwrap_half_line(&self) -> Unit<Vector<N>>
If this polyhedral cone spans a single half-line, returns its direction.
sourcepub fn transform_by(&mut self, m: &Isometry<N>)
pub fn transform_by(&mut self, m: &Isometry<N>)
Applies the given transformation to each direction bounded by this cone.
sourcepub fn contains(&self, v: &Vector<N>) -> bool
pub fn contains(&self, v: &Vector<N>) -> bool
Tests whether the given vector is contained by this cone.
sourcepub fn polar_contains_dir(&self, dir: &Unit<Vector<N>>) -> bool
pub fn polar_contains_dir(&self, dir: &Unit<Vector<N>>) -> bool
Tests if the polar of this cone contains the given direction.
This test is much sheaper than .contains()
.
sourcepub fn contains_dir(&self, dir: &Unit<Vector<N>>) -> bool
pub fn contains_dir(&self, dir: &Unit<Vector<N>>) -> bool
Tests if this cone contains the given unit direction.
Trait Implementations§
Auto Trait Implementations§
impl<N> RefUnwindSafe for PolyhedralCone<N>where
N: RefUnwindSafe,
impl<N> Send for PolyhedralCone<N>
impl<N> Sync for PolyhedralCone<N>
impl<N> Unpin for PolyhedralCone<N>where
N: Unpin,
impl<N> UnwindSafe for PolyhedralCone<N>where
N: UnwindSafe,
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.