Struct parry3d::bounding_volume::SimdAabb
source · pub struct SimdAabb {
pub mins: Point<SimdReal>,
pub maxs: Point<SimdReal>,
}
Expand description
Four Aabb represented as a single SoA Aabb with SIMD components.
Fields§
§mins: Point<SimdReal>
The min coordinates of the Aabbs.
maxs: Point<SimdReal>
The max coordinates the Aabbs.
Implementations§
source§impl SimdAabb
impl SimdAabb
sourcepub fn new_invalid() -> Self
pub fn new_invalid() -> Self
An invalid Aabb.
sourcepub fn half_extents(&self) -> Vector<SimdReal>
pub fn half_extents(&self) -> Vector<SimdReal>
The half-extents of all the Aabbs represented by `self``.
sourcepub fn transform_by(&self, transform: &Isometry<SimdReal>) -> Self
pub fn transform_by(&self, transform: &Isometry<SimdReal>) -> Self
Return the Aabb of the self
transformed by the given isometry.
sourcepub fn dilate_by_factor(&mut self, factor: SimdReal)
pub fn dilate_by_factor(&mut self, factor: SimdReal)
Dilate all the Aabbs represented by self`` by their extents multiplied by the given scale
factor`.
sourcepub fn replace(&mut self, i: usize, aabb: Aabb)
pub fn replace(&mut self, i: usize, aabb: Aabb)
Replace the i-th
Aabb of this SIMD AAAB by the given value.
sourcepub fn cast_local_ray(
&self,
ray: &SimdRay,
max_time_of_impact: SimdReal
) -> (SimdBool, SimdReal)
pub fn cast_local_ray( &self, ray: &SimdRay, max_time_of_impact: SimdReal ) -> (SimdBool, SimdReal)
Casts a ray on all the Aabbs represented by self
.
sourcepub fn distance_to_local_point(&self, point: &Point<SimdReal>) -> SimdReal
pub fn distance_to_local_point(&self, point: &Point<SimdReal>) -> SimdReal
Computes the distances between a point and all the Aabbs represented by self
.
sourcepub fn distance_to_origin(&self) -> SimdReal
pub fn distance_to_origin(&self) -> SimdReal
Computes the distances between the origin and all the Aabbs represented by self
.
sourcepub fn contains_local_point(&self, point: &Point<SimdReal>) -> SimdBool
pub fn contains_local_point(&self, point: &Point<SimdReal>) -> SimdBool
Check which Aabb represented by self
contains the given point
.
sourcepub fn contains(&self, other: &SimdAabb) -> SimdBool
pub fn contains(&self, other: &SimdAabb) -> SimdBool
Lanewise check which Aabb represented by self
contains the given set of other
aabbs.
The check is performed lane-wise.
sourcepub fn intersects(&self, other: &SimdAabb) -> SimdBool
pub fn intersects(&self, other: &SimdAabb) -> SimdBool
Check which Aabb represented by self
contains the given set of other
aabbs.
The check is performed lane-wise.
sourcepub fn intersects_permutations(&self, other: &SimdAabb) -> [SimdBool; 4]
pub fn intersects_permutations(&self, other: &SimdAabb) -> [SimdBool; 4]
Checks intersections between all the lanes combination between self
and other
.
The result is an array such that result[i].extract(j)
contains the intersection
result between self.extract(i)
and other.extract(j)
.
sourcepub fn to_merged_aabb(&self) -> Aabb
pub fn to_merged_aabb(&self) -> Aabb
Merge all the Aabb represented by self
into a single one.
Trait Implementations§
source§impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositeShapeAgainstAnyDistanceVisitor<'a, D, G1>
impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositeShapeAgainstAnyDistanceVisitor<'a, D, G1>
§type Result = (<G1 as TypedSimdCompositeShape>::PartId, f32)
type Result = (<G1 as TypedSimdCompositeShape>::PartId, f32)
source§impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositeShapeAgainstShapeClosestPointsVisitor<'a, D, G1>
impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositeShapeAgainstShapeClosestPointsVisitor<'a, D, G1>
§type Result = (<G1 as TypedSimdCompositeShape>::PartId, ClosestPoints)
type Result = (<G1 as TypedSimdCompositeShape>::PartId, ClosestPoints)
source§impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for IntersectionCompositeShapeShapeBestFirstVisitor<'a, D, G1>
impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for IntersectionCompositeShapeShapeBestFirstVisitor<'a, D, G1>
§type Result = (<G1 as TypedSimdCompositeShape>::PartId, bool)
type Result = (<G1 as TypedSimdCompositeShape>::PartId, bool)
source§impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for NonlinearTOICompositeShapeShapeBestFirstVisitor<'a, D, G1>
impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for NonlinearTOICompositeShapeShapeBestFirstVisitor<'a, D, G1>
§type Result = (<G1 as TypedSimdCompositeShape>::PartId, ShapeCastHit)
type Result = (<G1 as TypedSimdCompositeShape>::PartId, ShapeCastHit)
source§impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for TOICompositeShapeShapeBestFirstVisitor<'a, D, G1>
impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for TOICompositeShapeShapeBestFirstVisitor<'a, D, G1>
§type Result = (<G1 as TypedSimdCompositeShape>::PartId, ShapeCastHit)
type Result = (<G1 as TypedSimdCompositeShape>::PartId, ShapeCastHit)
source§impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
§type Result = (PointProjection, <S as TypedSimdCompositeShape>::PartId)
type Result = (PointProjection, <S as TypedSimdCompositeShape>::PartId)
source§impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjWithFeatureBestFirstVisitor<'a, S>
impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjWithFeatureBestFirstVisitor<'a, S>
§type Result = (PointProjection, (<S as TypedSimdCompositeShape>::PartId, FeatureId))
type Result = (PointProjection, (<S as TypedSimdCompositeShape>::PartId, FeatureId))
source§impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjWithLocationBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
<S::PartShape as PointQueryWithLocation>::Location: Copy,
S::PartShape: PointQueryWithLocation + Copy,
impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjWithLocationBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
<S::PartShape as PointQueryWithLocation>::Location: Copy,
S::PartShape: PointQueryWithLocation + Copy,
§type Result = (PointProjection, (<S as TypedSimdCompositeShape>::PartId, <<S as TypedSimdCompositeShape>::PartShape as PointQueryWithLocation>::Location))
type Result = (PointProjection, (<S as TypedSimdCompositeShape>::PartId, <<S as TypedSimdCompositeShape>::PartShape as PointQueryWithLocation>::Location))
source§impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for RayCompositeShapeToiAndNormalBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for RayCompositeShapeToiAndNormalBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
§type Result = (<S as TypedSimdCompositeShape>::PartId, RayIntersection)
type Result = (<S as TypedSimdCompositeShape>::PartId, RayIntersection)
source§impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for RayCompositeShapeToiBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for RayCompositeShapeToiBestFirstVisitor<'a, S>where
S: TypedSimdCompositeShape,
§type Result = (<S as TypedSimdCompositeShape>::PartId, f32)
type Result = (<S as TypedSimdCompositeShape>::PartId, f32)
source§impl<'a, S: SimdCompositeShape + PointQuery> SimdBestFirstVisitor<u32, SimdAabb> for CompositeClosestPointVisitor<'a, S>
impl<'a, S: SimdCompositeShape + PointQuery> SimdBestFirstVisitor<u32, SimdAabb> for CompositeClosestPointVisitor<'a, S>
§type Result = PointProjection
type Result = PointProjection
source§impl<T1, T2, F> SimdSimultaneousVisitor<T1, T2, SimdAabb> for BoundingVolumeIntersectionsSimultaneousVisitor<T1, T2, F>
impl<T1, T2, F> SimdSimultaneousVisitor<T1, T2, SimdAabb> for BoundingVolumeIntersectionsSimultaneousVisitor<T1, T2, F>
source§impl<'a, D, G1> SimdVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for IntersectionCompositeShapeShapeVisitor<'a, D, G1>
impl<'a, D, G1> SimdVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for IntersectionCompositeShapeShapeVisitor<'a, D, G1>
source§impl<'a, S: TypedSimdCompositeShape> SimdVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositePointContainmentTest<'a, S>
impl<'a, S: TypedSimdCompositeShape> SimdVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositePointContainmentTest<'a, S>
source§impl<T, F> SimdVisitor<T, SimdAabb> for BoundingVolumeIntersectionsVisitor<T, F>
impl<T, F> SimdVisitor<T, SimdAabb> for BoundingVolumeIntersectionsVisitor<T, F>
source§impl<'a, T, F> SimdVisitor<T, SimdAabb> for PointIntersectionsVisitor<'a, T, F>
impl<'a, T, F> SimdVisitor<T, SimdAabb> for PointIntersectionsVisitor<'a, T, F>
source§impl<'a, T, F> SimdVisitor<T, SimdAabb> for RayIntersectionsVisitor<'a, T, F>
impl<'a, T, F> SimdVisitor<T, SimdAabb> for RayIntersectionsVisitor<'a, T, F>
impl Copy for SimdAabb
Auto Trait Implementations§
impl Freeze for SimdAabb
impl RefUnwindSafe for SimdAabb
impl Send for SimdAabb
impl Sync for SimdAabb
impl Unpin for SimdAabb
impl UnwindSafe for SimdAabb
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.