[][src]Struct ncollide_geometry::shape::Tetrahedron

pub struct Tetrahedron<P> { /* fields omitted */ }

A tetrahedron with 4 vertices.

Methods

impl<P: Point> Tetrahedron<P>[src]

pub fn new(a: P, b: P, c: P, d: P) -> Tetrahedron<P>[src]

Creates a tetrahedron from three points.

pub fn from_array(arr: &[P; 4]) -> &Tetrahedron<P>[src]

Creates the reference to a tetrahedron from the reference to an array of four points.

pub fn a(&self) -> &P[src]

The fist point of this tetrahedron.

pub fn b(&self) -> &P[src]

The second point of this tetrahedron.

pub fn c(&self) -> &P[src]

The third point of this tetrahedron.

pub fn d(&self) -> &P[src]

The fourth point of this tetrahedron.

pub fn face(&self, i: usize) -> Triangle<P>[src]

Retuns 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<P>[src]

Retuns 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.

Trait Implementations

impl<P: Point, M: Isometry<P>> PointQuery<P, M> for Tetrahedron<P>[src]

fn distance_to_point(&self, m: &M, pt: &P, solid: bool) -> P::Real[src]

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

fn contains_point(&self, m: &M, pt: &P) -> bool[src]

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

impl<P: Point, M: Isometry<P>> PointQueryWithLocation<P, M> for Tetrahedron<P>[src]

type Location = TetrahedronPointLocation<P::Real>

Additional shape-specific projection information Read more

impl<P: Copy> Copy for Tetrahedron<P>[src]

impl<P: Clone> Clone for Tetrahedron<P>[src]

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

Performs copy-assignment from source. Read more

impl<P: Debug> Debug for Tetrahedron<P>[src]

Auto Trait Implementations

impl<P> Send for Tetrahedron<P> where
    P: Send

impl<P> Sync for Tetrahedron<P> where
    P: Sync

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

The resulting type after obtaining ownership.

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> Any for T where
    T: 'static + ?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<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self