Struct oxygengine_physics_2d::prelude::ncollide2d::bounding_volume::AABB [−][src]
An Axis Aligned Bounding Box.
Fields
mins: Point<N, U2>
maxs: Point<N, U2>
Implementations
impl<N> AABB<N> where
N: RealField,
[src]
impl<N> AABB<N> where
N: RealField,
[src]pub fn new(mins: Point<N, U2>, maxs: Point<N, U2>) -> 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 new_invalid() -> AABB<N>
[src]
Creates an invalid AABB with mins
components set to N::max_values
and maxs
components 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, U2>,
half_extents: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> AABB<N>
[src]
center: Point<N, U2>,
half_extents: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> AABB<N>
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, U2>>,
[src]
I: IntoIterator<Item = &'a Point<N, U2>>,
Creates a new AABB from a set of points.
pub fn mins(&self) -> &Point<N, U2>
[src]
use the .mins
public field instead.
Reference to the AABB point with the smallest components along each axis.
pub fn maxs(&self) -> &Point<N, U2>
[src]
use the .maxs
public field instead.
Reference to the AABB point with the biggest components along each axis.
pub fn center(&self) -> Point<N, U2>
[src]
The center of this AABB.
pub fn half_extents(
&self
) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
[src]
&self
) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
The half extents of this AABB.
pub fn extents(
&self
) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
[src]
&self
) -> Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
The extents of this AABB.
pub fn take_point(&mut self, pt: Point<N, U2>)
[src]
Enlarges this AABB so it also contains the point pt
.
pub fn transform_by(&self, m: &Isometry<N, U2, Unit<Complex<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, U2>) -> bool
[src]
impl<N> AABB<N> where
N: RealField,
[src]
impl<N> AABB<N> where
N: RealField,
[src]pub fn clip_line_parameters(
&self,
orig: &Point<N, U2>,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> Option<(N, N)>
[src]
&self,
orig: &Point<N, U2>,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> 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, U2>,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> Option<Segment<N>>
[src]
&self,
orig: &Point<N, U2>,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> 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]
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: CompositeShape<N> + PointQuery<N>,
[src]
impl<'a, N, S> BestFirstVisitor<N, usize, AABB<N>> for CompositeClosestPointVisitor<'a, N, S> where
N: RealField,
S: CompositeShape<N> + PointQuery<N>,
[src]type Result = PointProjection<N>
The result of a best-first traversal.
pub fn visit(
&mut self,
best: N,
aabb: &AABB<N>,
data: Option<&usize>
) -> BestFirstVisitStatus<N, <CompositeClosestPointVisitor<'a, N, S> as BestFirstVisitor<N, usize, AABB<N>>>::Result>
[src]
&mut self,
best: N,
aabb: &AABB<N>,
data: Option<&usize>
) -> BestFirstVisitStatus<N, <CompositeClosestPointVisitor<'a, N, S> as BestFirstVisitor<N, usize, AABB<N>>>::Result>
impl<N> BoundingVolume<N> for AABB<N> where
N: RealField,
[src]
impl<N> BoundingVolume<N> for AABB<N> where
N: RealField,
[src]pub fn center(&self) -> Point<N, U2>
[src]
pub fn intersects(&self, other: &AABB<N>) -> bool
[src]
pub fn contains(&self, other: &AABB<N>) -> bool
[src]
pub fn merge(&mut self, other: &AABB<N>)
[src]
pub fn merged(&self, other: &AABB<N>) -> AABB<N>
[src]
pub fn loosen(&mut self, amount: N)
[src]
pub fn loosened(&self, amount: N) -> AABB<N>
[src]
pub fn tighten(&mut self, amount: N)
[src]
pub fn tightened(&self, amount: N) -> AABB<N>
[src]
impl<'de, N> Deserialize<'de> for AABB<N> where
N: RealField + Deserialize<'de>,
[src]
impl<'de, N> Deserialize<'de> for AABB<N> where
N: RealField + Deserialize<'de>,
[src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<AABB<N>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<AABB<N>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<N> HasBoundingVolume<N, AABB<N>> for Plane<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Plane<N> where
N: RealField,
[src]pub fn bounding_volume(&self, &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Polyline<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Polyline<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Triangle<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Triangle<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Ball<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Ball<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Segment<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Segment<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Compound<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Compound<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for ConvexPolygon<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for ConvexPolygon<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for dyn Shape<N> + 'static where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for dyn Shape<N> + 'static where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Capsule<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Capsule<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Cuboid<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for Cuboid<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for HeightField<N> where
N: RealField,
[src]
impl<N> HasBoundingVolume<N, AABB<N>> for HeightField<N> where
N: RealField,
[src]pub fn bounding_volume(&self, m: &Isometry<N, U2, Unit<Complex<N>>>) -> AABB<N>
[src]
pub fn local_bounding_volume(&self) -> AABB<N>
[src]
impl<N> PointQuery<N> for AABB<N> where
N: RealField,
[src]
impl<N> PointQuery<N> for AABB<N> where
N: RealField,
[src]pub fn project_point(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>,
solid: bool
) -> PointProjection<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>,
solid: bool
) -> PointProjection<N>
pub fn project_point_with_feature(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>
) -> (PointProjection<N>, FeatureId)
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>
) -> (PointProjection<N>, FeatureId)
pub fn distance_to_point(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>,
solid: bool
) -> N
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>,
solid: bool
) -> N
pub fn contains_point(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>
) -> bool
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
pt: &Point<N, U2>
) -> bool
impl<N> RayCast<N> for AABB<N> where
N: RealField,
[src]
impl<N> RayCast<N> for AABB<N> where
N: RealField,
[src]pub fn toi_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<N>
pub fn toi_and_normal_with_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
pub fn intersects_ray(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>,
ray: &Ray<N>,
max_toi: N
) -> bool
impl<N> Serialize for AABB<N> where
N: RealField + Serialize,
[src]
impl<N> Serialize for AABB<N> where
N: RealField + Serialize,
[src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<'a, N, T> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T> where
N: RealField,
T: Clone,
[src]
impl<'a, N, T> SimultaneousVisitor<T, AABB<N>> for AABBSetsInterferencesCollector<'a, N, T> where
N: RealField,
T: Clone,
[src]impl<N> StructuralPartialEq for AABB<N> where
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,
impl<N> RefUnwindSafe for AABB<N> where
N: RefUnwindSafe,
impl<N> UnwindSafe for AABB<N> where
N: UnwindSafe,
impl<N> UnwindSafe for AABB<N> where
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
pub fn get_type_id(&self) -> TypeId
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,