pub trait ConvexPolyhedron<'a, T: Scalar>: Debug {
    type Face: ConvexPolygon3d<'a, T>;

    fn num_faces(&self) -> usize;
    fn get_face(&self, index: usize) -> Option<Self::Face>;

    fn compute_signed_distance(
        &self,
        point: &Point3<T>
    ) -> SignedDistanceResult<T, U3>
    where
        T: Real
, { ... } fn compute_volume(&'a self) -> T
    where
        T: Real
, { ... } fn contains_point(&'a self, point: &Point3<T>) -> bool
    where
        T: Real
, { ... } }

Required Associated Types§

Required Methods§

source

fn num_faces(&self) -> usize

source

fn get_face(&self, index: usize) -> Option<Self::Face>

Provided Methods§

source

fn compute_signed_distance(
    &self,
    point: &Point3<T>
) -> SignedDistanceResult<T, U3>where
    T: Real,

source

fn compute_volume(&'a self) -> Twhere
    T: Real,

source

fn contains_point(&'a self, point: &Point3<T>) -> boolwhere
    T: Real,

Check if this polyhedron contains the given point.

TODO: Write tests

Implementors§

source§

impl<'a, T> ConvexPolyhedron<'a, T> for Hexahedron<T>where
    T: Real,

§

type Face = Quad3d<T>

source§

impl<'a, T> ConvexPolyhedron<'a, T> for Tetrahedron<T>where
    T: Real,

§

type Face = Triangle<T, Const<3>>