Struct heron::rapier_plugin::rapier::ncollide::bounding_volume::AABB[][src]

pub struct AABB<N> where
    N: RealField
{ pub mins: Point<N, U3>, pub maxs: Point<N, U3>, }

An Axis Aligned Bounding Box.

Fields

mins: Point<N, U3>maxs: Point<N, U3>

Implementations

impl<N> AABB<N> where
    N: RealField
[src]

pub fn new(mins: Point<N, U3>, maxs: Point<N, U3>) -> 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 of mins must be smaller than the related components of maxs.

pub fn new_invalid() -> AABB<N>[src]

Creates an invalid AABB with mins components set to N::max_values and maxscomponents set to -N::max_values.

This is often used as the initial values of some AABB merging algorithms.

pub fn from_half_extents(
    center: Point<N, U3>,
    half_extents: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> AABB<N>
[src]

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

pub fn from_points<'a, I>(pts: I) -> AABB<N> where
    I: IntoIterator<Item = &'a Point<N, U3>>, 
[src]

Creates a new AABB from a set of points.

pub fn mins(&self) -> &Point<N, U3>[src]

👎 Deprecated:

use the .mins public field instead.

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

pub fn maxs(&self) -> &Point<N, U3>[src]

👎 Deprecated:

use the .maxs public field instead.

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

pub fn center(&self) -> Point<N, U3>[src]

The center of this AABB.

pub fn half_extents(
    &self
) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
[src]

The half extents of this AABB.

pub fn extents(
    &self
) -> Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
[src]

The extents of this AABB.

pub fn take_point(&mut self, pt: Point<N, U3>)[src]

Enlarges this AABB so it also contains the point pt.

pub fn transform_by(&self, m: &Isometry<N, U3, Unit<Quaternion<N>>>) -> AABB<N>[src]

Computes the AABB bounding self transformed by m.

pub fn bounding_sphere(&self) -> BoundingSphere<N>[src]

The smallest bounding sphere containing this AABB.

pub fn contains_local_point(&self, point: &Point<N, U3>) -> bool[src]

impl<N> AABB<N> where
    N: RealField
[src]

pub fn clip_line_parameters(
    &self,
    orig: &Point<N, U3>,
    dir: &Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> Option<(N, N)>
[src]

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, U3>,
    dir: &Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> 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<'a, N, S> BestFirstVisitor<N, usize, AABB<N>> for CompositeClosestPointVisitor<'a, N, S> where
    N: RealField,
    S: PointQuery<N> + CompositeShape<N>, 
[src]

type Result = PointProjection<N>

The result of a best-first traversal.

impl<N> BoundingVolume<N> for AABB<N> where
    N: RealField
[src]

impl<N> Clone for AABB<N> where
    N: Clone + RealField
[src]

impl<N> Copy for AABB<N> where
    N: Copy + RealField
[src]

impl<N> Debug for AABB<N> where
    N: Debug + RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Cone<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Capsule<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Ball<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Polyline<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for HeightField<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for TriMesh<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Compound<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Cuboid<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Plane<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for ConvexHull<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Segment<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Triangle<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Cylinder<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for dyn Shape<N> + 'static where
    N: RealField
[src]

impl<N> PartialEq<AABB<N>> for AABB<N> where
    N: PartialEq<N> + RealField
[src]

impl<N> PointQuery<N> for AABB<N> where
    N: RealField
[src]

impl<N> RayCast<N> for AABB<N> where
    N: RealField
[src]

impl<'a, N, T> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T> where
    T: Clone,
    N: RealField
[src]

impl<N> StructuralPartialEq for AABB<N> where
    N: RealField
[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for AABB<N> where
    N: RefUnwindSafe
[src]

impl<N> Send for AABB<N>[src]

impl<N> Sync for AABB<N>[src]

impl<N> Unpin for AABB<N> where
    N: Unpin
[src]

impl<N> UnwindSafe for AABB<N> where
    N: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Resource for T where
    T: 'static + Send + Sync

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<T> Slottable for T where
    T: Copy
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,