[−][src]Struct ncollide2d::bounding_volume::AABB
An Axis Aligned Bounding Box.
Methods
impl<N: RealField> 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 from_half_extents(center: Point<N>, half_extents: Vector<N>) -> Self
[src]
Creates a new AABB from its scenter and its half-extents.
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.
pub fn extents(&self) -> Vector<N>
[src]
The extents of this AABB.
pub fn transform_by(&self, m: &Isometry<N>) -> Self
[src]
Computes the AABB bounding self
transformed by m
.
pub fn bounding_sphere(&self) -> BoundingSphere<N>
[src]
The smallest bounding sphere containing this AABB.
impl<N: RealField> AABB<N>
[src]
pub fn clip_line_parameters(
&self,
orig: &Point<N>,
dir: &Vector<N>
) -> Option<(N, N)>
[src]
&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]
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]
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]
Computes the intersection segment between a ray and this AABB.
Returns None
if there is no intersection.
Trait Implementations
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Ball<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Compound<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for ConvexPolygon<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Cuboid<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Plane<N>
[src]
fn bounding_volume(&self, _: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Polyline<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for dyn Shape<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Capsule<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Segment<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for HeightField<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
impl<N: RealField> BoundingVolume<N> for AABB<N>
[src]
fn center(&self) -> Point<N>
[src]
fn intersects(&self, other: &AABB<N>) -> bool
[src]
fn contains(&self, other: &AABB<N>) -> bool
[src]
fn merge(&mut self, other: &AABB<N>)
[src]
fn merged(&self, other: &AABB<N>) -> AABB<N>
[src]
fn loosen(&mut self, amount: N)
[src]
fn loosened(&self, amount: N) -> AABB<N>
[src]
fn tighten(&mut self, amount: N)
[src]
fn tightened(&self, amount: N) -> AABB<N>
[src]
impl<'a, N: RealField, T: Clone> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T>
[src]
fn visit(
&mut self,
left_bv: &AABB<N>,
left_data: Option<&T>,
right_bv: &AABB<N>,
right_data: Option<&T>
) -> VisitStatus
[src]
&mut self,
left_bv: &AABB<N>,
left_data: Option<&T>,
right_bv: &AABB<N>,
right_data: Option<&T>
) -> VisitStatus
impl<'a, N: RealField, S: CompositeShape<N> + PointQuery<N>> BestFirstVisitor<N, usize, AABB<N>> for CompositeClosestPointVisitor<'a, N, S>
[src]
type Result = PointProjection<N>
The result of a best-fist traversal.
fn visit_bv(&mut self, aabb: &AABB<N>) -> BestFirstBVVisitStatus<N>
[src]
fn visit_data(
&mut self,
b: &usize
) -> BestFirstDataVisitStatus<N, PointProjection<N>>
[src]
&mut self,
b: &usize
) -> BestFirstDataVisitStatus<N, PointProjection<N>>
impl<N: RealField> 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>
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)
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N
[src]
fn contains_point(&self, m: &Isometry<N>, pt: &Point<N>) -> bool
[src]
impl<N: RealField> RayCast<N> for AABB<N>
[src]
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, solid: bool) -> Option<N>
[src]
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>>
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
[src]
Tests whether a ray intersects this transformed shape.
impl<N: PartialEq + RealField> PartialEq<AABB<N>> for AABB<N>
[src]
impl<N: Clone + RealField> Clone for AABB<N>
[src]
fn clone(&self) -> AABB<N>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<N: Debug + RealField> Debug for AABB<N>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> Same for T
type Output = T
Should always be Self