Struct ncollide2d::bounding_volume::AABB
[−]
[src]
pub struct AABB<N: Real> { /* fields omitted */ }
An Axis Aligned Bounding Box.
Methods
impl<N: Real> AABB<N>
[src]
pub fn new(mins: Point<N>, maxs: Point<N>) -> AABB<N>
[src]
Creates a new AABB.
Arguments:
mins
- position of the point with the smallest coordinates.maxs
- position of the point with the highest coordinates. Each component ofmins
must be smaller than the related components ofmaxs
.
pub fn mins(&self) -> &Point<N>
[src]
Reference to the AABB point with the smallest components along each axis.
pub fn maxs(&self) -> &Point<N>
[src]
Reference to the AABB point with the biggest components along each axis.
pub fn center(&self) -> Point<N>
[src]
The center of this AABB.
pub fn half_extents(&self) -> Vector<N>
[src]
The half extents of this AABB.
Trait Implementations
impl<N: Debug + Real> Debug for AABB<N>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<N: PartialEq + Real> PartialEq for AABB<N>
[src]
fn eq(&self, __arg_0: &AABB<N>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AABB<N>) -> bool
[src]
This method tests for !=
.
impl<N: Clone + Real> Clone for AABB<N>
[src]
fn clone(&self) -> AABB<N>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<N: Real> BoundingVolume<N> for AABB<N>
[src]
fn center(&self) -> Point<N>
[src]
Returns a point inside of this bounding volume. This is ideally its center.
fn intersects(&self, other: &AABB<N>) -> bool
[src]
Checks if this bounding volume intersect with another one.
fn contains(&self, other: &AABB<N>) -> bool
[src]
Checks if this bounding volume contains another one.
fn merge(&mut self, other: &AABB<N>)
[src]
Merges this bounding volume with another one. The merge is done in-place.
fn merged(&self, other: &AABB<N>) -> AABB<N>
[src]
Merges this bounding volume with another one.
fn loosen(&mut self, amount: N)
[src]
Enlarges this bounding volume.
fn loosened(&self, amount: N) -> AABB<N>
[src]
Creates a new, enlarged version, of this bounding volume.
fn tighten(&mut self, amount: N)
[src]
Tighten this bounding volume.
fn tightened(&self, amount: N) -> AABB<N>
[src]
Creates a new, tightened version, of this bounding volume.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for Cuboid<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for Segment<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for Ball<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for Plane<N>
[src]
fn bounding_volume(&self, _: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for ConvexPolygon<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for Compound<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for Polyline<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, AABB<N>> for Shape<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
The bounding volume of self
transformed by m
.
impl<N: Real> PointQuery<N> for AABB<N>
[src]
fn project_point(
&self,
m: &Isometry<N>,
pt: &Point<N>,
solid: bool
) -> PointProjection<N>
[src]
&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]
&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]
Computes the minimal distance between a point and self
transformed by m
.
fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool
[src]
Tests if the given point is inside of self
transformed by m
.
impl<N: Real> RayCast<N> for AABB<N>
[src]
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, solid: bool) -> Option<N>
[src]
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]
&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]
Tests whether a ray intersects this transformed shape.