Trait parry2d_f64::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_and_get_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
fn project_local_point_and_get_location(
&self,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
[src]
&self,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
Projects a point on self
.
Provided methods
fn project_point_and_get_location(
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
[src]
&self,
m: &Isometry<Real>,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
Projects a point on self
transformed by m
.
Implementors
impl PointQueryWithLocation for HeightField
[src]
type Location = (usize, TrianglePointLocation)
fn project_local_point_and_get_location(
&self,
_point: &Point<Real>,
_: bool
) -> (PointProjection, Self::Location)
[src]
&self,
_point: &Point<Real>,
_: bool
) -> (PointProjection, Self::Location)
impl PointQueryWithLocation for Polyline
[src]
type Location = (u32, SegmentPointLocation)
fn project_local_point_and_get_location(
&self,
point: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
[src]
&self,
point: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
impl PointQueryWithLocation for Segment
[src]
type Location = SegmentPointLocation
fn project_local_point_and_get_location(
&self,
pt: &Point<Real>,
_: bool
) -> (PointProjection, Self::Location)
[src]
&self,
pt: &Point<Real>,
_: bool
) -> (PointProjection, Self::Location)
impl PointQueryWithLocation for TriMesh
[src]
type Location = (u32, TrianglePointLocation)
fn project_local_point_and_get_location(
&self,
point: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
[src]
&self,
point: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
impl PointQueryWithLocation for Triangle
[src]
type Location = TrianglePointLocation
fn project_local_point_and_get_location(
&self,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)
[src]
&self,
pt: &Point<Real>,
solid: bool
) -> (PointProjection, Self::Location)