Struct ncollide3d::shape::Tetrahedron [−][src]
#[repr(C)]pub struct Tetrahedron<N: RealField> { pub a: Point<N>, pub b: Point<N>, pub c: Point<N>, pub d: Point<N>, }
A tetrahedron with 4 vertices.
Fields
a: Point<N>
The tetrahedron first point.
b: Point<N>
The tetrahedron first point.
c: Point<N>
The tetrahedron first point.
d: Point<N>
The tetrahedron first point.
Implementations
impl<N: RealField> Tetrahedron<N>
[src]
impl<N: RealField> Tetrahedron<N>
[src]pub fn new(a: Point<N>, b: Point<N>, c: Point<N>, d: Point<N>) -> Tetrahedron<N>
[src]
Creates a tetrahedron from three points.
pub fn from_array(arr: &[Point<N>; 4]) -> &Tetrahedron<N>
[src]
Creates the reference to a tetrahedron from the reference to an array of four points.
pub fn a(&self) -> &Point<N>
[src]
use the self.a
public field directly.
The fist point of this tetrahedron.
pub fn b(&self) -> &Point<N>
[src]
use the self.b
public field directly.
The second point of this tetrahedron.
pub fn c(&self) -> &Point<N>
[src]
use the self.c
public field directly.
The third point of this tetrahedron.
pub fn d(&self) -> &Point<N>
[src]
use the self.d
public field directly.
The fourth point of this tetrahedron.
pub fn face(&self, i: usize) -> Triangle<N>
[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: usize) -> (usize, usize, usize)
[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: usize) -> Segment<N>
[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: usize) -> (usize, usize)
[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<N>) -> Option<[N; 4]>
[src]
Computes the barycentric coordinates of the given point in the coordinate system of this tetrahedron.
Returns None
if this tetrahedron is degenerate.
Trait Implementations
impl<N: Clone + RealField> Clone for Tetrahedron<N>
[src]
impl<N: Clone + RealField> Clone for Tetrahedron<N>
[src]fn clone(&self) -> Tetrahedron<N>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N: Debug + RealField> Debug for Tetrahedron<N>
[src]
impl<N: Debug + RealField> Debug for Tetrahedron<N>
[src]impl<N: RealField> PointQuery<N> for Tetrahedron<N>
[src]
impl<N: RealField> PointQuery<N> for Tetrahedron<N>
[src]fn project_point(
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
[src]
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
fn project_point_with_feature(
&self,
m: &Isometry<N>,
pt: &Point<N>
) -> (PointProjection<N>, FeatureId)
[src]
&self,
m: &Isometry<N>,
pt: &Point<N>
) -> (PointProjection<N>, FeatureId)
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N
[src]
fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool
[src]
impl<N: RealField> PointQueryWithLocation<N> for Tetrahedron<N>
[src]
impl<N: RealField> PointQueryWithLocation<N> for Tetrahedron<N>
[src]type Location = TetrahedronPointLocation<N>
Additional shape-specific projection information Read more
fn project_point_with_location(
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> (PointProjection<N>, Self::Location)
[src]
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> (PointProjection<N>, Self::Location)
impl<N: Copy + RealField> Copy for Tetrahedron<N>
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Tetrahedron<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Tetrahedron<N>
impl<N> Sync for Tetrahedron<N>
impl<N> Unpin for Tetrahedron<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Tetrahedron<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]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> Slottable for T where
T: Copy,
[src]
T: Copy,