Struct parry3d::shape::Tetrahedron [−][src]
A tetrahedron with 4 vertices.
Fields
a: Point<Real>
The tetrahedron first point.
b: Point<Real>
The tetrahedron first point.
c: Point<Real>
The tetrahedron first point.
d: Point<Real>
The tetrahedron first point.
Implementations
impl Tetrahedron
[src]
pub fn new(
a: Point<Real>,
b: Point<Real>,
c: Point<Real>,
d: Point<Real>
) -> Tetrahedron
[src]
a: Point<Real>,
b: Point<Real>,
c: Point<Real>,
d: Point<Real>
) -> Tetrahedron
Creates a tetrahedron from three points.
pub fn from_array(arr: &[Point<Real>; 4]) -> &Tetrahedron
[src]
Creates the reference to a tetrahedron from the reference to an array of four points.
pub fn face(&self, i: usize) -> Triangle
[src]
Returns the i-th face of this tetrahedron.
The 0-th face is the triangle ABC. The 1-st face is the triangle ABD. The 2-nd face is the triangle ACD. The 3-rd face is the triangle BCD.
pub fn face_ids(i: u32) -> (u32, u32, u32)
[src]
Returns the i-th face of this tetrahedron.
The 0-th face is the triangle ABC. The 1-st face is the triangle ABD. The 2-nd face is the triangle ACD. The 3-rd face is the triangle BCD.
pub fn edge(&self, i: u32) -> Segment
[src]
Returns the i-th edge of this tetrahedron.
The 0-st 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.
pub fn edge_ids(i: u32) -> (u32, u32)
[src]
Returns the indices of the vertices of the i-th edge of this tetrahedron.
The 0-st 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.
pub fn barycentric_coordinates(&self, p: &Point<Real>) -> Option<[Real; 4]>
[src]
Computes the barycentric coordinates of the given point in the coordinate system of this tetrahedron.
Returns None
if this tetrahedron is degenerate.
pub fn volume(&self) -> Real
[src]
Computes the volume of this tetrahedron.
pub fn signed_volume(&self) -> Real
[src]
Computes the signed volume of this tetrahedron.
If it is positive, p4
is on the half-space pointed by the normal of the oriented triangle
(p1, p2, p3)
.
pub fn center(&self) -> Point<Real>
[src]
Computes the center of this tetrahedron.
Trait Implementations
impl Clone for Tetrahedron
[src]
fn clone(&self) -> Tetrahedron
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Tetrahedron
[src]
impl Debug for Tetrahedron
[src]
impl PointQuery for Tetrahedron
[src]
fn project_local_point(&self, pt: &Point<Real>, solid: bool) -> PointProjection
[src]
fn project_local_point_and_get_feature(
&self,
pt: &Point<Real>
) -> (PointProjection, FeatureId)
[src]
&self,
pt: &Point<Real>
) -> (PointProjection, FeatureId)
fn distance_to_local_point(&self, pt: &Point<Real>, solid: bool) -> Real
[src]
fn contains_local_point(&self, pt: &Point<Real>) -> bool
[src]
fn project_point(
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> PointProjection
[src]
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> PointProjection
fn distance_to_point(
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> Real
[src]
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> Real
fn project_point_and_get_feature(
&self,
m: &Isometry<Real>,
pt: &Point<Real>
) -> (PointProjection, FeatureId)
[src]
&self,
m: &Isometry<Real>,
pt: &Point<Real>
) -> (PointProjection, FeatureId)
fn contains_point(&self, m: &Isometry<Real>, pt: &Point<Real>) -> bool
[src]
impl PointQueryWithLocation for Tetrahedron
[src]
type Location = TetrahedronPointLocation
Additional shape-specific projection information Read more
fn project_local_point_and_get_location(
&self,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
[src]
&self,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
fn project_point_and_get_location(
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
[src]
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
Auto Trait Implementations
impl RefUnwindSafe for Tetrahedron
impl Send for Tetrahedron
impl Sync for Tetrahedron
impl Unpin for Tetrahedron
impl UnwindSafe for Tetrahedron
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,