parry3d/query/point/
point_round_shape.rs1use crate::math::{Point, Real};
2use crate::query::gjk::VoronoiSimplex;
3use crate::query::{PointProjection, PointQuery};
4use crate::shape::{FeatureId, RoundShape, SupportMap};
5
6impl<S: SupportMap> PointQuery for RoundShape<S> {
9 #[inline]
10 fn project_local_point(&self, point: &Point<Real>, solid: bool) -> PointProjection {
11 #[cfg(not(feature = "alloc"))]
12 return unimplemented!(
13 "The projection of points on a round shape isn't supported without alloc yet."
14 );
15
16 #[cfg(feature = "alloc")]
17 return crate::query::details::local_point_projection_on_support_map(
18 self,
19 &mut VoronoiSimplex::new(),
20 point,
21 solid,
22 );
23 }
24
25 #[inline]
26 fn project_local_point_and_get_feature(
27 &self,
28 point: &Point<Real>,
29 ) -> (PointProjection, FeatureId) {
30 (self.project_local_point(point, false), FeatureId::Unknown)
31 }
32}