ncollide3d::query

Trait PointQuery

Source
pub trait PointQuery<N: RealField + Copy> {
    // Required methods
    fn project_point(
        &self,
        m: &Isometry<N>,
        pt: &Point<N>,
        solid: bool,
    ) -> PointProjection<N>;
    fn project_point_with_feature(
        &self,
        m: &Isometry<N>,
        pt: &Point<N>,
    ) -> (PointProjection<N>, FeatureId);

    // Provided methods
    fn distance_to_point(
        &self,
        m: &Isometry<N>,
        pt: &Point<N>,
        solid: bool,
    ) -> N { ... }
    fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool { ... }
}
Expand description

Trait of objects that can be tested for point inclusion and projection.

Required Methods§

Source

fn project_point( &self, m: &Isometry<N>, pt: &Point<N>, solid: bool, ) -> PointProjection<N>

Projects a point on self transformed by m.

Source

fn project_point_with_feature( &self, m: &Isometry<N>, pt: &Point<N>, ) -> (PointProjection<N>, FeatureId)

Projects a point on the boundary of self transformed by m and retuns the id of the feature the point was projected on.

Provided Methods§

Source

fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N

Computes the minimal distance between a point and self transformed by m.

Source

fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool

Tests if the given point is inside of self transformed by m.

Implementors§