[][src]Struct ncollide3d::shape::Tetrahedron

pub struct Tetrahedron<N: Real> { /* fields omitted */ }

A tetrahedron with 4 vertices.

Methods

impl<N: Real> 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]

The fist point of this tetrahedron.

pub fn b(&self) -> &Point<N>[src]

The second point of this tetrahedron.

pub fn c(&self) -> &Point<N>[src]

The third point of this tetrahedron.

pub fn d(&self) -> &Point<N>[src]

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: Real> PointQuery<N> for Tetrahedron<N>[src]

fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N[src]

Computes the minimal distance between a point and self transformed by m.

fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool[src]

Tests if the given point is inside of self transformed by m.

impl<N: Real> PointQueryWithLocation<N> for Tetrahedron<N>[src]

type Location = TetrahedronPointLocation<N>

Additional shape-specific projection information Read more

impl<N: Copy + Real> Copy for Tetrahedron<N>[src]

impl<N: Clone + Real> Clone for Tetrahedron<N>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Debug + Real> Debug for Tetrahedron<N>[src]

Auto Trait Implementations

impl<N> Send for Tetrahedron<N> where
    N: Scalar

impl<N> Sync for Tetrahedron<N> where
    N: Scalar

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> Same for T

type Output = T

Should always be Self