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§
sourcefn vertex(&self, id: FeatureId) -> OPoint<N, Const<2>>
fn vertex(&self, id: FeatureId) -> OPoint<N, Const<2>>
Gets the specified vertex in the shape local-space.
sourcefn face(&self, id: FeatureId, face: &mut ConvexPolygonalFeature<N>)
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.
sourcefn feature_normal(
&self,
feature: FeatureId
) -> Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>
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.
sourcefn 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_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
.
sourcefn 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_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
.
sourcefn support_feature_id_toward(
&self,
local_dir: &Unit<Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>>
) -> FeatureId
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
.