Trait heron::rapier_plugin::rapier::ncollide::query::PointQueryWithLocation [−][src]
Returns shape-specific info in addition to generic projection information
One requirement for the PointQuery
trait is to be usable as a trait
object. Unfortunately this precludes us from adding an associated type to it
that might allow us to return shape-specific information in addition to the
general information provided in PointProjection
. This is where
PointQueryWithLocation
comes in. It forgoes the ability to be used as a trait
object in exchange for being able to provide shape-specific projection
information.
Any shapes that implement PointQuery
but are able to provide extra
information, can implement PointQueryWithLocation
in addition and have their
PointQuery::project_point
implementation just call out to
PointQueryWithLocation::project_point_with_location
.
Associated Types
type Location
[src]
Additional shape-specific projection information
In addition to the generic projection information returned in
PointProjection
, implementations might provide shape-specific
projection info. The type of this shape-specific information is defined
by this associated type.
Required methods
pub fn project_point_with_location(
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
solid: bool
) -> (PointProjection<N>, Self::Location)
[src]
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
solid: bool
) -> (PointProjection<N>, Self::Location)
Projects a point on self
transformed by m
.
Implementors
impl<N> PointQueryWithLocation<N> for HeightField<N> where
N: RealField,
[src]
N: RealField,
type Location = (usize, TrianglePointLocation<N>)
pub fn project_point_with_location(
&self,
_m: &Isometry<N, U3, Unit<Quaternion<N>>>,
_point: &Point<N, U3>,
bool
) -> (PointProjection<N>, <HeightField<N> as PointQueryWithLocation<N>>::Location)
[src]
&self,
_m: &Isometry<N, U3, Unit<Quaternion<N>>>,
_point: &Point<N, U3>,
bool
) -> (PointProjection<N>, <HeightField<N> as PointQueryWithLocation<N>>::Location)
impl<N> PointQueryWithLocation<N> for Polyline<N> where
N: RealField,
[src]
N: RealField,
type Location = (usize, SegmentPointLocation<N>)
pub fn project_point_with_location(
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
point: &Point<N, U3>,
bool
) -> (PointProjection<N>, <Polyline<N> as PointQueryWithLocation<N>>::Location)
[src]
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
point: &Point<N, U3>,
bool
) -> (PointProjection<N>, <Polyline<N> as PointQueryWithLocation<N>>::Location)
impl<N> PointQueryWithLocation<N> for Segment<N> where
N: RealField,
[src]
N: RealField,
type Location = SegmentPointLocation<N>
pub fn project_point_with_location(
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
bool
) -> (PointProjection<N>, <Segment<N> as PointQueryWithLocation<N>>::Location)
[src]
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
bool
) -> (PointProjection<N>, <Segment<N> as PointQueryWithLocation<N>>::Location)
impl<N> PointQueryWithLocation<N> for Tetrahedron<N> where
N: RealField,
[src]
N: RealField,
type Location = TetrahedronPointLocation<N>
pub fn project_point_with_location(
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
solid: bool
) -> (PointProjection<N>, <Tetrahedron<N> as PointQueryWithLocation<N>>::Location)
[src]
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
solid: bool
) -> (PointProjection<N>, <Tetrahedron<N> as PointQueryWithLocation<N>>::Location)
impl<N> PointQueryWithLocation<N> for TriMesh<N> where
N: RealField,
[src]
N: RealField,
type Location = (usize, TrianglePointLocation<N>)
pub fn project_point_with_location(
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
point: &Point<N, U3>,
bool
) -> (PointProjection<N>, <TriMesh<N> as PointQueryWithLocation<N>>::Location)
[src]
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
point: &Point<N, U3>,
bool
) -> (PointProjection<N>, <TriMesh<N> as PointQueryWithLocation<N>>::Location)
impl<N> PointQueryWithLocation<N> for Triangle<N> where
N: RealField,
[src]
N: RealField,
type Location = TrianglePointLocation<N>
pub fn project_point_with_location(
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
solid: bool
) -> (PointProjection<N>, <Triangle<N> as PointQueryWithLocation<N>>::Location)
[src]
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>,
pt: &Point<N, U3>,
solid: bool
) -> (PointProjection<N>, <Triangle<N> as PointQueryWithLocation<N>>::Location)