Enum parry3d::shape::TetrahedronPointLocation
source · pub enum TetrahedronPointLocation {
OnVertex(u32),
OnEdge(u32, [Real; 2]),
OnFace(u32, [Real; 3]),
OnSolid,
}
Expand description
Logical description of the location of a point on a triangle.
Variants§
OnVertex(u32)
The point lies on a vertex.
OnEdge(u32, [Real; 2])
The point lies on an edge.
The 0-th edge is the segment AB. The 1-st edge is the segment AC. The 2-nd edge is the segment AD. The 3-rd edge is the segment BC. The 4-th edge is the segment BD. The 5-th edge is the segment CD.
OnFace(u32, [Real; 3])
The point lies on a triangular face interior.
The first face is the triangle ABC. The second face is the triangle ABD. The third face is the triangle ACD. The fourth face is the triangle BDC.
OnSolid
The point lies inside of the tetrahedron.
Implementations§
source§impl TetrahedronPointLocation
impl TetrahedronPointLocation
sourcepub fn barycentric_coordinates(&self) -> Option<[Real; 4]>
pub fn barycentric_coordinates(&self) -> Option<[Real; 4]>
The barycentric coordinates corresponding to this point location.
Returns None
if the location is TetrahedronPointLocation::OnSolid
.
sourcepub fn same_feature_as(&self, other: &TetrahedronPointLocation) -> bool
pub fn same_feature_as(&self, other: &TetrahedronPointLocation) -> bool
Returns true
if both self
and other
correspond to points on the same feature of a tetrahedron.
Trait Implementations§
source§impl Clone for TetrahedronPointLocation
impl Clone for TetrahedronPointLocation
source§fn clone(&self) -> TetrahedronPointLocation
fn clone(&self) -> TetrahedronPointLocation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TetrahedronPointLocation
impl Debug for TetrahedronPointLocation
impl Copy for TetrahedronPointLocation
Auto Trait Implementations§
impl Freeze for TetrahedronPointLocation
impl RefUnwindSafe for TetrahedronPointLocation
impl Send for TetrahedronPointLocation
impl Sync for TetrahedronPointLocation
impl Unpin for TetrahedronPointLocation
impl UnwindSafe for TetrahedronPointLocation
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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§fn to_subset_unchecked(&self) -> SS
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.