[][src]Struct gut::prim::tetrahedron::Tetrahedron

pub struct Tetrahedron<T>(pub Vector3<T>, pub Vector3<T>, pub Vector3<T>, pub Vector3<T>);

Generic tetrahedron with four points

Methods

impl<T: Clone> Tetrahedron<T>[src]

pub fn from_indexed_slice<V: Into<[T; 3]> + Clone>(
    indices: &[usize; 4],
    slice: &[V]
) -> Tetrahedron<T>
[src]

Build a Tetrahedron from a quadruple of indices.

pub fn new([a, b, c, d]: [[T; 3]; 4]) -> Self[src]

Build a new tetrahedron from an array of vertex positions.

impl<T: Pod> Tetrahedron<T>[src]

pub fn as_array(&self) -> &[[T; 3]; 4][src]

Return this tetrahedron as an array of vertex positions.

This can be useful for performing custom arithmetic on the tetrahedron positions.

impl<T> Tetrahedron<T>[src]

pub fn into_array(self) -> [[T; 3]; 4][src]

Convert this tet into an array of vertex positions.

Trait Implementations

impl<'a, T: BaseNum + FromPrimitive> Centroid<[T; 3]> for &'a Tetrahedron<T>[src]

impl<'a, T: BaseFloat> Volume<T> for &'a Tetrahedron<T>[src]

impl<T: BaseFloat> Volume<T> for Tetrahedron<T>[src]

impl<'a, T: BaseNum> ShapeMatrix<[[T; 3]; 3]> for &'a Tetrahedron<T>[src]

Column-major array matrix.

impl<T: BaseNum> ShapeMatrix<[[T; 3]; 3]> for Tetrahedron<T>[src]

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

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

impl<T: PartialEq> PartialEq<Tetrahedron<T>> for Tetrahedron<T>[src]

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

impl<T: BaseNum> Sub<Tetrahedron<T>> for Tetrahedron<T>[src]

type Output = Tetrahedron<T>

The resulting type after applying the - operator.

impl<'a, T: BaseNum> Sub<&'a Tetrahedron<T>> for &'a Tetrahedron<T>[src]

type Output = Tetrahedron<T>

The resulting type after applying the - operator.

impl<T: BaseNum> Add<Tetrahedron<T>> for Tetrahedron<T>[src]

type Output = Tetrahedron<T>

The resulting type after applying the + operator.

impl<'a, T: BaseNum> Add<&'a Tetrahedron<T>> for &'a Tetrahedron<T>[src]

type Output = Tetrahedron<T>

The resulting type after applying the + operator.

impl<T: BaseNum> Mul<T> for Tetrahedron<T>[src]

type Output = Self

The resulting type after applying the * operator.

impl<'a, T: BaseNum> Mul<T> for &'a Tetrahedron<T>[src]

type Output = Tetrahedron<T>

The resulting type after applying the * operator.

impl<T> StructuralPartialEq for Tetrahedron<T>[src]

Auto Trait Implementations

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

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

impl<T> Unpin for Tetrahedron<T> where
    T: Unpin

impl<T> UnwindSafe for Tetrahedron<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Tetrahedron<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Bytes for T[src]

impl<T> Pod for T where
    T: 'static + Copy + Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> 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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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