pub trait ConvexPolyhedron<N>: SupportMap<N>where
    N: RealField + Copy,{
    // Required methods
    fn vertex(&self, id: FeatureId) -> OPoint<N, Const<2>>;
    fn face(&self, id: FeatureId, face: &mut ConvexPolygonalFeature<N>);
    fn feature_normal(
        &self,
        feature: FeatureId
    ) -> Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>;
    fn support_face_toward(
        &self,
        transform: &Isometry<N, Unit<Complex<N>>, 2>,
        dir: &Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>,
        out: &mut ConvexPolygonalFeature<N>
    );
    fn support_feature_toward(
        &self,
        transform: &Isometry<N, Unit<Complex<N>>, 2>,
        dir: &Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>,
        _angle: N,
        out: &mut ConvexPolygonalFeature<N>
    );
    fn support_feature_id_toward(
        &self,
        local_dir: &Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>
    ) -> FeatureId;
}
Expand description

Trait implemented by all convex polyhedron.

Required Methods§

source

fn vertex(&self, id: FeatureId) -> OPoint<N, Const<2>>

Gets the specified vertex in the shape local-space.

source

fn face(&self, id: FeatureId, face: &mut ConvexPolygonalFeature<N>)

Fill face with the geometric description of the specified face, in the shape’s local-space.

source

fn feature_normal( &self, feature: FeatureId ) -> Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>

Returns any normal from the normal cone of the given feature.

source

fn support_face_toward( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, dir: &Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>, out: &mut ConvexPolygonalFeature<N> )

Retrieve the face (in world-space) with a normal that maximizes the scalar product with dir.

source

fn support_feature_toward( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, dir: &Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>, _angle: N, out: &mut ConvexPolygonalFeature<N> )

Retrieve the feature (in world-space) which normal cone contains dir.

source

fn support_feature_id_toward( &self, local_dir: &Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>> ) -> FeatureId

Retrieve the identifier of the feature which normal cone contains dir.

Implementors§

source§

impl<N> ConvexPolyhedron<N> for ConvexPolygon<N>where N: RealField + Copy,

source§

impl<N> ConvexPolyhedron<N> for Cuboid<N>where N: RealField + Copy,

source§

impl<N> ConvexPolyhedron<N> for Segment<N>where N: RealField + Copy,