pub trait PointQuery {
// Required methods
fn project_local_point(
&self,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> PointProjection;
fn project_local_point_and_get_feature(
&self,
pt: &OPoint<f32, Const<2>>,
) -> (PointProjection, FeatureId);
// Provided methods
fn project_local_point_with_max_dist(
&self,
pt: &OPoint<f32, Const<2>>,
solid: bool,
max_dist: f32,
) -> Option<PointProjection> { ... }
fn project_point_with_max_dist(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
solid: bool,
max_dist: f32,
) -> Option<PointProjection> { ... }
fn distance_to_local_point(
&self,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> f32 { ... }
fn contains_local_point(&self, pt: &OPoint<f32, Const<2>>) -> bool { ... }
fn project_point(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> PointProjection { ... }
fn distance_to_point(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> f32 { ... }
fn project_point_and_get_feature(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
) -> (PointProjection, FeatureId) { ... }
fn contains_point(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
) -> bool { ... }
}
Expand description
Trait of objects that can be tested for point inclusion and projection.
Required Methods§
Sourcefn project_local_point(
&self,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> PointProjection
fn project_local_point( &self, pt: &OPoint<f32, Const<2>>, solid: bool, ) -> PointProjection
Projects a point on self
.
The point is assumed to be expressed in the local-space of self
.
Sourcefn project_local_point_and_get_feature(
&self,
pt: &OPoint<f32, Const<2>>,
) -> (PointProjection, FeatureId)
fn project_local_point_and_get_feature( &self, pt: &OPoint<f32, Const<2>>, ) -> (PointProjection, FeatureId)
Projects a point on the boundary of self
and returns the id of the
feature the point was projected on.
Provided Methods§
Sourcefn project_local_point_with_max_dist(
&self,
pt: &OPoint<f32, Const<2>>,
solid: bool,
max_dist: f32,
) -> Option<PointProjection>
fn project_local_point_with_max_dist( &self, pt: &OPoint<f32, Const<2>>, solid: bool, max_dist: f32, ) -> Option<PointProjection>
Projects a point on self
, unless the projection lies further than the given max distance.
The point is assumed to be expressed in the local-space of self
.
Sourcefn project_point_with_max_dist(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
solid: bool,
max_dist: f32,
) -> Option<PointProjection>
fn project_point_with_max_dist( &self, m: &Isometry<f32, Unit<Complex<f32>>, 2>, pt: &OPoint<f32, Const<2>>, solid: bool, max_dist: f32, ) -> Option<PointProjection>
Projects a point on self
transformed by m
, unless the projection lies further than the given max distance.
Sourcefn distance_to_local_point(
&self,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> f32
fn distance_to_local_point( &self, pt: &OPoint<f32, Const<2>>, solid: bool, ) -> f32
Computes the minimal distance between a point and self
.
Sourcefn contains_local_point(&self, pt: &OPoint<f32, Const<2>>) -> bool
fn contains_local_point(&self, pt: &OPoint<f32, Const<2>>) -> bool
Tests if the given point is inside of self
.
Sourcefn project_point(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> PointProjection
fn project_point( &self, m: &Isometry<f32, Unit<Complex<f32>>, 2>, pt: &OPoint<f32, Const<2>>, solid: bool, ) -> PointProjection
Projects a point on self
transformed by m
.
Sourcefn distance_to_point(
&self,
m: &Isometry<f32, Unit<Complex<f32>>, 2>,
pt: &OPoint<f32, Const<2>>,
solid: bool,
) -> f32
fn distance_to_point( &self, m: &Isometry<f32, Unit<Complex<f32>>, 2>, pt: &OPoint<f32, Const<2>>, solid: bool, ) -> f32
Computes the minimal distance between a point and self
transformed by m
.