Enum ncollide2d::shape::FeatureId
source · Expand description
An identifier of a feature of a convex polyhedron.
This identifier is shape-dependent and is seach that it allows an efficient retrieval of the geometric information of the feature.
Variants§
Vertex(usize)
Shape-dependent identifier of a vertex.
Face(usize)
Shape-dependent identifier of a face.
Unknown
Unknown identifier.
Implementations§
source§impl FeatureId
impl FeatureId
sourcepub fn unwrap_vertex(self) -> usize
pub fn unwrap_vertex(self) -> usize
Revries the value of the identifier if self
is a vertex.
sourcepub fn unwrap_face(self) -> usize
pub fn unwrap_face(self) -> usize
Revries the value of the identifier if self
is a face.
Trait Implementations§
impl Copy for FeatureId
impl Eq for FeatureId
impl StructuralEq for FeatureId
impl StructuralPartialEq for FeatureId
Auto Trait Implementations§
impl RefUnwindSafe for FeatureId
impl Send for FeatureId
impl Sync for FeatureId
impl Unpin for FeatureId
impl UnwindSafe for FeatureId
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>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§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).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.