[−][src]Trait oxygengine_physics_2d::prelude::ncollide2d::query::RayCast
Traits of objects which can be transformed and tested for intersection with a ray.
Required methods
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
Computes the time of impact, and normal between this transformed shape and a ray.
Provided methods
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
Computes the time of impact between this transform shape and a ray.
fn intersects_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
Tests whether a ray intersects this transformed shape.
Implementors
impl<N> RayCast<N> for AABB<N> where
N: RealField,
[src]
N: RealField,
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for BoundingSphere<N> where
N: RealField,
[src]
N: RealField,
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
fn intersects_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
impl<N> RayCast<N> for Ball<N> where
N: RealField,
[src]
N: RealField,
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for Capsule<N> where
N: RealField,
[src]
N: RealField,
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for Compound<N> where
N: RealField,
[src]
N: RealField,
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for ConvexPolygon<N> where
N: RealField,
[src]
N: RealField,
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for Cuboid<N> where
N: RealField,
[src]
N: RealField,
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for HeightField<N> where
N: RealField,
[src]
N: RealField,
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for Plane<N> where
N: RealField,
[src]
N: RealField,
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for Polyline<N> where
N: RealField,
[src]
N: RealField,
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for Segment<N> where
N: RealField,
[src]
N: RealField,
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
impl<N> RayCast<N> for dyn Shape<N> + 'static where
N: RealField,
[src]
N: RealField,
fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
fn intersects_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool