pub trait PolygonalFeatureMap: SupportMap {
// Required method
fn local_support_feature(
&self,
dir: Vector,
out_feature: &mut PolygonalFeature,
);
// Provided methods
fn local_support_feature_toward(
&self,
dir: Vector,
hint: Vector,
out_feature: &mut PolygonalFeature,
) { ... }
fn is_convex_polyhedron(&self) -> bool { ... }
}Expand description
Trait implemented by convex shapes with features with polyhedral approximations.
Required Methods§
Sourcefn local_support_feature(&self, dir: Vector, out_feature: &mut PolygonalFeature)
fn local_support_feature(&self, dir: Vector, out_feature: &mut PolygonalFeature)
Compute the support polygonal face of self towards the dir.
Provided Methods§
Sourcefn local_support_feature_toward(
&self,
dir: Vector,
hint: Vector,
out_feature: &mut PolygonalFeature,
)
fn local_support_feature_toward( &self, dir: Vector, hint: Vector, out_feature: &mut PolygonalFeature, )
Compute the support polygonal face of self towards dir, oriented so that it best
covers the neighborhood of the local-space point hint.
The default implementation ignores hint, which is exact for genuine polygons.
Shapes approximating a curved feature (like a cylinder cap by an inscribed square)
must orient it from hint: a fixed azimuth misses up to ~36% of the cap near its
rim, leaving contacts there with a single unclippable point.
Sourcefn is_convex_polyhedron(&self) -> bool
fn is_convex_polyhedron(&self) -> bool
Is this shape a ConvexPolyhedron?
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".