# [−][src]Struct ncollide2d::bounding_volume::AABB

An Axis Aligned Bounding Box.

## Methods

`impl<N: Real> AABB<N>`

[src]

`impl<N: Real> AABB<N>`

`pub fn new(mins: Point<N>, maxs: Point<N>) -> AABB<N>`

[src]

`pub fn new(mins: Point<N>, maxs: Point<N>) -> AABB<N>`

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 of`mins`

must be smaller than the related components of`maxs`

.

`pub fn from_half_extents(center: Point<N>, half_extents: Vector<N>) -> Self`

[src]

`pub fn from_half_extents(center: Point<N>, half_extents: Vector<N>) -> Self`

Creates a new AABB from its scenter and its half-extents.

`pub fn mins(&self) -> &Point<N>`

[src]

`pub fn mins(&self) -> &Point<N>`

Reference to the AABB point with the smallest components along each axis.

`pub fn maxs(&self) -> &Point<N>`

[src]

`pub fn maxs(&self) -> &Point<N>`

Reference to the AABB point with the biggest components along each axis.

`pub fn center(&self) -> Point<N>`

[src]

`pub fn center(&self) -> Point<N>`

The center of this AABB.

`pub fn half_extents(&self) -> Vector<N>`

[src]

`pub fn half_extents(&self) -> Vector<N>`

The half extents of this AABB.

`pub fn extents(&self) -> Vector<N>`

[src]

`pub fn extents(&self) -> Vector<N>`

The extents of this AABB.

`pub fn transform_by(&self, m: &Isometry<N>) -> Self`

[src]

`pub fn transform_by(&self, m: &Isometry<N>) -> Self`

Computes the AABB bounding `self`

transformed by `m`

.

`pub fn bounding_sphere(&self) -> BoundingSphere<N>`

[src]

`pub fn bounding_sphere(&self) -> BoundingSphere<N>`

The smallest bounding sphere containing this AABB.

`impl<N: Real> AABB<N>`

[src]

`impl<N: Real> AABB<N>`

`pub fn clip_line_parameters(`

&self,

orig: &Point<N>,

dir: &Vector<N>

) -> Option<(N, N)>

[src]

`pub fn clip_line_parameters(`

&self,

orig: &Point<N>,

dir: &Vector<N>

) -> Option<(N, N)>

Computes the parameters of the two intersection points between a line and this AABB.

The parameters are such that the point are given by `orig + dir * parameter`

.
Returns `None`

if there is no intersection.

`pub fn clip_line(&self, orig: &Point<N>, dir: &Vector<N>) -> Option<Segment<N>>`

[src]

`pub fn clip_line(&self, orig: &Point<N>, dir: &Vector<N>) -> Option<Segment<N>>`

Computes the intersection segment between a line and this AABB.

Returns `None`

if there is no intersection.

`pub fn clip_ray_parameters(&self, ray: &Ray<N>) -> Option<(N, N)>`

[src]

`pub fn clip_ray_parameters(&self, ray: &Ray<N>) -> Option<(N, N)>`

Computes the parameters of the two intersection points between a ray and this AABB.

The parameters are such that the point are given by `ray.orig + ray.dir * parameter`

.
Returns `None`

if there is no intersection.

`pub fn clip_ray(&self, ray: &Ray<N>) -> Option<Segment<N>>`

[src]

`pub fn clip_ray(&self, ray: &Ray<N>) -> Option<Segment<N>>`

Computes the intersection segment between a ray and this AABB.

Returns `None`

if there is no intersection.

## Trait Implementations

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Ball<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Ball<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Compound<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Compound<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for ConvexPolygon<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for ConvexPolygon<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Cuboid<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Cuboid<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Plane<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Plane<N>`

`fn bounding_volume(&self, _: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, _: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Polyline<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Polyline<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for dyn Shape<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for dyn Shape<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Capsule<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Capsule<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Segment<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for Segment<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for HeightField<N>`

[src]

`impl<N: Real> HasBoundingVolume<N, AABB<N>> for HeightField<N>`

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

[src]

`fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>`

`impl<N: Real> BoundingVolume<N> for AABB<N>`

[src]

`impl<N: Real> BoundingVolume<N> for AABB<N>`

`fn center(&self) -> Point<N>`

[src]

`fn center(&self) -> Point<N>`

`fn intersects(&self, other: &AABB<N>) -> bool`

[src]

`fn intersects(&self, other: &AABB<N>) -> bool`

`fn contains(&self, other: &AABB<N>) -> bool`

[src]

`fn contains(&self, other: &AABB<N>) -> bool`

`fn merge(&mut self, other: &AABB<N>)`

[src]

`fn merge(&mut self, other: &AABB<N>)`

`fn merged(&self, other: &AABB<N>) -> AABB<N>`

[src]

`fn merged(&self, other: &AABB<N>) -> AABB<N>`

`fn loosen(&mut self, amount: N)`

[src]

`fn loosen(&mut self, amount: N)`

`fn loosened(&self, amount: N) -> AABB<N>`

[src]

`fn loosened(&self, amount: N) -> AABB<N>`

`fn tighten(&mut self, amount: N)`

[src]

`fn tighten(&mut self, amount: N)`

`fn tightened(&self, amount: N) -> AABB<N>`

[src]

`fn tightened(&self, amount: N) -> AABB<N>`

`impl<'a, N: Real, T: Clone> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T>`

[src]

`impl<'a, N: Real, T: Clone> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T>`

`fn visit(`

&mut self,

left_bv: &AABB<N>,

left_data: Option<&T>,

right_bv: &AABB<N>,

right_data: Option<&T>

) -> VisitStatus

[src]

`fn visit(`

&mut self,

left_bv: &AABB<N>,

left_data: Option<&T>,

right_bv: &AABB<N>,

right_data: Option<&T>

) -> VisitStatus

`impl<'a, N: Real, S: CompositeShape<N> + PointQuery<N>> BestFirstVisitor<N, usize, AABB<N>> for CompositeClosestPointVisitor<'a, N, S>`

[src]

`impl<'a, N: Real, S: CompositeShape<N> + PointQuery<N>> BestFirstVisitor<N, usize, AABB<N>> for CompositeClosestPointVisitor<'a, N, S>`

`type Result = PointProjection<N>`

The result of a best-fist traversal.

`fn visit_bv(&mut self, aabb: &AABB<N>) -> BestFirstBVVisitStatus<N>`

[src]

`fn visit_bv(&mut self, aabb: &AABB<N>) -> BestFirstBVVisitStatus<N>`

`fn visit_data(`

&mut self,

b: &usize

) -> BestFirstDataVisitStatus<N, PointProjection<N>>

[src]

`fn visit_data(`

&mut self,

b: &usize

) -> BestFirstDataVisitStatus<N, PointProjection<N>>

`impl<N: Real> PointQuery<N> for AABB<N>`

[src]

`impl<N: Real> PointQuery<N> for AABB<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>

`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)

`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`

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

[src]

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

`impl<N: Real> RayCast<N> for AABB<N>`

[src]

`impl<N: Real> RayCast<N> for AABB<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>`

`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>>

`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.

`impl<N: Clone + Real> Clone for AABB<N>`

[src]

`impl<N: Clone + Real> Clone for AABB<N>`

`fn clone(&self) -> AABB<N>`

[src]

`fn clone(&self) -> AABB<N>`

`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: PartialEq + Real> PartialEq<AABB<N>> for AABB<N>`

[src]

`impl<N: PartialEq + Real> PartialEq<AABB<N>> for AABB<N>`

`impl<N: Debug + Real> Debug for AABB<N>`

[src]

`impl<N: Debug + Real> Debug for AABB<N>`

## Auto Trait Implementations

## Blanket Implementations

`impl<T> From for T`

[src]

`impl<T> From for T`

`impl<T, U> Into for T where`

U: From<T>,

[src]

`impl<T, U> Into for T where`

U: From<T>,

`impl<T> ToOwned for T where`

T: Clone,

[src]

`impl<T> ToOwned for T where`

T: Clone,

`impl<T, U> TryFrom for T where`

T: From<U>,

[src]

`impl<T, U> TryFrom for T where`

T: From<U>,

`type Error = !`

`try_from`

)The type returned in the event of a conversion error.

`fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`

[src]

`fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`

`impl<T> Borrow for T where`

T: ?Sized,

[src]

`impl<T> Borrow for T where`

T: ?Sized,

`impl<T> Any for T where`

T: 'static + ?Sized,

[src]

`impl<T> Any for T where`

T: 'static + ?Sized,

`fn get_type_id(&self) -> TypeId`

[src]

`fn get_type_id(&self) -> TypeId`

`impl<T, U> TryInto for T where`

U: TryFrom<T>,

[src]

`impl<T, U> TryInto for T where`

U: TryFrom<T>,

`type Error = <U as TryFrom<T>>::Error`

`try_from`

)The type returned in the event of a conversion error.

`fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`

[src]

`fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`

`impl<T> BorrowMut for T where`

T: ?Sized,

[src]

`impl<T> BorrowMut for T where`

T: ?Sized,

`fn borrow_mut(&mut self) -> &mut T`

[src]

`fn borrow_mut(&mut self) -> &mut T`

`impl<SS, SP> SupersetOf for SP where`

SS: SubsetOf<SP>,

`impl<SS, SP> SupersetOf for SP where`

SS: SubsetOf<SP>,

`fn to_subset(&self) -> Option<SS>`

`fn to_subset(&self) -> Option<SS>`

`fn is_in_subset(&self) -> bool`

`fn is_in_subset(&self) -> bool`

`unsafe fn to_subset_unchecked(&self) -> SS`

`unsafe fn to_subset_unchecked(&self) -> SS`

`fn from_subset(element: &SS) -> SP`

`fn from_subset(element: &SS) -> SP`

`impl<T> Downcast for T where`

T: Any,

`impl<T> Downcast for T where`

T: Any,

`fn into_any(self: Box<T>) -> Box<dyn Any + 'static>`

`fn into_any(self: Box<T>) -> Box<dyn Any + 'static>`

`fn as_any(&self) -> &(dyn Any + 'static)`

`fn as_any(&self) -> &(dyn Any + 'static)`

`fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)`

`fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)`

`impl<T> Same for T`

`impl<T> Same for T`

`type Output = T`

Should always be `Self`