Struct ncollide2d::bounding_volume::BoundingSphere [−][src]
pub struct BoundingSphere<N: Real> { /* fields omitted */ }
A Bounding Sphere.
Methods
impl<N: Real> BoundingSphere<N>
[src]
impl<N: Real> BoundingSphere<N>
pub fn new(center: Point<N>, radius: N) -> BoundingSphere<N>
[src]
pub fn new(center: Point<N>, radius: N) -> BoundingSphere<N>
Creates a new bounding sphere.
pub fn center(&self) -> &Point<N>
[src]
pub fn center(&self) -> &Point<N>
The bounding sphere center.
pub fn radius(&self) -> N
[src]
pub fn radius(&self) -> N
The bounding sphere radius.
pub fn transform_by(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
pub fn transform_by(&self, m: &Isometry<N>) -> BoundingSphere<N>
Transforms this bounding sphere by m
.
Trait Implementations
impl<N: Debug + Real> Debug for BoundingSphere<N>
[src]
impl<N: Debug + Real> Debug for BoundingSphere<N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<N: PartialEq + Real> PartialEq for BoundingSphere<N>
[src]
impl<N: PartialEq + Real> PartialEq for BoundingSphere<N>
fn eq(&self, other: &BoundingSphere<N>) -> bool
[src]
fn eq(&self, other: &BoundingSphere<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &BoundingSphere<N>) -> bool
[src]
fn ne(&self, other: &BoundingSphere<N>) -> bool
This method tests for !=
.
impl<N: Clone + Real> Clone for BoundingSphere<N>
[src]
impl<N: Clone + Real> Clone for BoundingSphere<N>
fn clone(&self) -> BoundingSphere<N>
[src]
fn clone(&self) -> BoundingSphere<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N: Real> BoundingVolume<N> for BoundingSphere<N>
[src]
impl<N: Real> BoundingVolume<N> for BoundingSphere<N>
fn center(&self) -> Point<N>
[src]
fn center(&self) -> Point<N>
Returns a point inside of this bounding volume. This is ideally its center.
fn intersects(&self, other: &BoundingSphere<N>) -> bool
[src]
fn intersects(&self, other: &BoundingSphere<N>) -> bool
Checks if this bounding volume intersect with another one.
fn contains(&self, other: &BoundingSphere<N>) -> bool
[src]
fn contains(&self, other: &BoundingSphere<N>) -> bool
Checks if this bounding volume contains another one.
fn merge(&mut self, other: &BoundingSphere<N>)
[src]
fn merge(&mut self, other: &BoundingSphere<N>)
Merges this bounding volume with another one. The merge is done in-place.
fn merged(&self, other: &BoundingSphere<N>) -> BoundingSphere<N>
[src]
fn merged(&self, other: &BoundingSphere<N>) -> BoundingSphere<N>
Merges this bounding volume with another one.
fn loosen(&mut self, amount: N)
[src]
fn loosen(&mut self, amount: N)
Enlarges this bounding volume.
fn loosened(&self, amount: N) -> BoundingSphere<N>
[src]
fn loosened(&self, amount: N) -> BoundingSphere<N>
Creates a new, enlarged version, of this bounding volume.
fn tighten(&mut self, amount: N)
[src]
fn tighten(&mut self, amount: N)
Tighten this bounding volume.
fn tightened(&self, amount: N) -> BoundingSphere<N>
[src]
fn tightened(&self, amount: N) -> BoundingSphere<N>
Creates a new, tightened version, of this bounding volume.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Cuboid<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Cuboid<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Ball<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Ball<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Capsule<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Capsule<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Plane<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Plane<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for ConvexPolygon<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for ConvexPolygon<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Compound<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Compound<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Segment<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Segment<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Polyline<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Polyline<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Shape<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for Shape<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> PointQuery<N> for BoundingSphere<N>
[src]
impl<N: Real> PointQuery<N> for BoundingSphere<N>
fn project_point(
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
[src]
fn project_point(
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
Projects a point on self
transformed by m
.
fn project_point_with_feature(
&self,
m: &Isometry<N>,
pt: &Point<N>
) -> (PointProjection<N>, FeatureId)
[src]
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. Read more
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N
[src]
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
.
fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool
[src]
fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool
Tests if the given point is inside of self
transformed by m
.
impl<N: Real> RayCast<N> for BoundingSphere<N>
[src]
impl<N: Real> RayCast<N> for BoundingSphere<N>
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, solid: bool) -> Option<N>
[src]
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, solid: bool) -> Option<N>
Computes the time of impact between this transform shape and a ray.
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
solid: bool
) -> Option<RayIntersection<N>>
[src]
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
solid: bool
) -> Option<RayIntersection<N>>
Computes the time of impact, and normal between this transformed shape and a ray.
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
[src]
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
Tests whether a ray intersects this transformed shape.
Auto Trait Implementations
impl<N> Send for BoundingSphere<N>
impl<N> Send for BoundingSphere<N>
impl<N> Sync for BoundingSphere<N>
impl<N> Sync for BoundingSphere<N>