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

source

pub fn new_invalid() -> Self

An invalid Aabb.

source

pub fn splat(aabb: Aabb) -> Self

Builds an SIMD aabb composed of four identical aabbs.

source

pub fn center(&self) -> Point<SimdReal>

The center of all the Aabbs represented by `self``.

source

pub fn half_extents(&self) -> Vector<SimdReal>

The half-extents of all the Aabbs represented by `self``.

source

pub fn radius(&self) -> SimdReal

The radius of all the Aabbs represented by `self``.

source

pub fn transform_by(&self, transform: &Isometry<SimdReal>) -> Self

Return the Aabb of the self transformed by the given isometry.

source

pub fn scaled(self, scale: &Vector<SimdReal>) -> Self

Returns a scaled version of this Aabb.

source

pub fn loosen(&mut self, margin: SimdReal)

Enlarges this bounding volume by the given margin.

source

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

source

pub fn replace(&mut self, i: usize, aabb: Aabb)

Replace the i-th Aabb of this SIMD AAAB by the given value.

source

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.

source

pub fn distance_to_local_point(&self, point: &Point<SimdReal>) -> SimdReal

Computes the distances between a point and all the Aabbs represented by self.

source

pub fn distance_to_origin(&self) -> SimdReal

Computes the distances between the origin and all the Aabbs represented by self.

source

pub fn contains_local_point(&self, point: &Point<SimdReal>) -> SimdBool

Check which Aabb represented by self contains the given point.

source

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.

source

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.

source

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

source

pub fn to_merged_aabb(&self) -> Aabb

Merge all the Aabb represented by self into a single one.

source

pub fn extract(&self, lane: usize) -> Aabb

Extracts the Aabb stored in the given SIMD lane of the SIMD Aabb:

Trait Implementations§

source§

impl Clone for SimdAabb

source§

fn clone(&self) -> SimdAabb

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SimdAabb

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<[Aabb; 4]> for SimdAabb

source§

fn from(aabbs: [Aabb; 4]) -> Self

Converts to this type from the input type.
source§

impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositeShapeAgainstAnyDistanceVisitor<'a, D, G1>

§

type Result = (<G1 as TypedSimdCompositeShape>::PartId, f32)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, bv: &SimdAabb, data: Option<[Option<&G1::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositeShapeAgainstShapeClosestPointsVisitor<'a, D, G1>

§

type Result = (<G1 as TypedSimdCompositeShape>::PartId, ClosestPoints)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, bv: &SimdAabb, data: Option<[Option<&G1::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for IntersectionCompositeShapeShapeBestFirstVisitor<'a, D, G1>

§

type Result = (<G1 as TypedSimdCompositeShape>::PartId, bool)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, bv: &SimdAabb, data: Option<[Option<&G1::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for NonlinearTOICompositeShapeShapeBestFirstVisitor<'a, D, G1>

§

type Result = (<G1 as TypedSimdCompositeShape>::PartId, ShapeCastHit)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, bv: &SimdAabb, data: Option<[Option<&G1::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, D, G1> SimdBestFirstVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for TOICompositeShapeShapeBestFirstVisitor<'a, D, G1>

§

type Result = (<G1 as TypedSimdCompositeShape>::PartId, ShapeCastHit)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, bv: &SimdAabb, data: Option<[Option<&G1::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjBestFirstVisitor<'a, S>

§

type Result = (PointProjection, <S as TypedSimdCompositeShape>::PartId)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, aabb: &SimdAabb, data: Option<[Option<&S::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjWithFeatureBestFirstVisitor<'a, S>

§

type Result = (PointProjection, (<S as TypedSimdCompositeShape>::PartId, FeatureId))

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, aabb: &SimdAabb, data: Option<[Option<&S::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for PointCompositeShapeProjWithLocationBestFirstVisitor<'a, S>

§

type Result = (PointProjection, (<S as TypedSimdCompositeShape>::PartId, <<S as TypedSimdCompositeShape>::PartShape as PointQueryWithLocation>::Location))

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, aabb: &SimdAabb, data: Option<[Option<&S::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for RayCompositeShapeToiAndNormalBestFirstVisitor<'a, S>

§

type Result = (<S as TypedSimdCompositeShape>::PartId, RayIntersection)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, aabb: &SimdAabb, data: Option<[Option<&S::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, S> SimdBestFirstVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for RayCompositeShapeToiBestFirstVisitor<'a, S>

§

type Result = (<S as TypedSimdCompositeShape>::PartId, f32)

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, aabb: &SimdAabb, data: Option<[Option<&S::PartId>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<'a, S: SimdCompositeShape + PointQuery> SimdBestFirstVisitor<u32, SimdAabb> for CompositeClosestPointVisitor<'a, S>

§

type Result = PointProjection

The result of a best-first traversal.
source§

fn visit( &mut self, best: Real, aabb: &SimdAabb, data: Option<[Option<&u32>; 4]> ) -> SimdBestFirstVisitStatus<Self::Result>

Compute the next action to be taken by the best-first-search after visiting a node containing the given bounding volume.
source§

impl<T1, T2, F> SimdSimultaneousVisitor<T1, T2, SimdAabb> for BoundingVolumeIntersectionsSimultaneousVisitor<T1, T2, F>
where F: FnMut(&T1, &T2) -> bool,

source§

fn visit( &mut self, left_bv: &SimdAabb, left_data: Option<[Option<&T1>; 4]>, right_bv: &SimdAabb, right_data: Option<[Option<&T2>; 4]> ) -> SimdSimultaneousVisitStatus

Execute an operation on the content of two nodes, one from each structure. Read more
source§

impl<'a, D, G1> SimdVisitor<<G1 as TypedSimdCompositeShape>::PartId, SimdAabb> for IntersectionCompositeShapeShapeVisitor<'a, D, G1>

source§

fn visit( &mut self, bv: &SimdAabb, data: Option<[Option<&G1::PartId>; 4]> ) -> SimdVisitStatus

Execute an operation on the content of a node of the spatial partitioning structure. Read more
source§

impl<'a, S: TypedSimdCompositeShape> SimdVisitor<<S as TypedSimdCompositeShape>::PartId, SimdAabb> for CompositePointContainmentTest<'a, S>

source§

fn visit( &mut self, bv: &SimdAabb, b: Option<[Option<&S::PartId>; 4]> ) -> SimdVisitStatus

Execute an operation on the content of a node of the spatial partitioning structure. Read more
source§

impl<T, F> SimdVisitor<T, SimdAabb> for BoundingVolumeIntersectionsVisitor<T, F>
where F: FnMut(&T) -> bool,

source§

fn visit( &mut self, bv: &SimdAabb, b: Option<[Option<&T>; 4]> ) -> SimdVisitStatus

Execute an operation on the content of a node of the spatial partitioning structure. Read more
source§

impl<'a, T, F> SimdVisitor<T, SimdAabb> for PointIntersectionsVisitor<'a, T, F>
where F: FnMut(&T) -> bool,

source§

fn visit( &mut self, bv: &SimdAabb, b: Option<[Option<&T>; 4]> ) -> SimdVisitStatus

Execute an operation on the content of a node of the spatial partitioning structure. Read more
source§

impl<'a, T, F> SimdVisitor<T, SimdAabb> for RayIntersectionsVisitor<'a, T, F>
where F: FnMut(&T) -> bool,

source§

fn visit( &mut self, bv: &SimdAabb, b: Option<[Option<&T>; 4]> ) -> SimdVisitStatus

Execute an operation on the content of a node of the spatial partitioning structure. Read more
source§

impl Copy for SimdAabb

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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

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

Convert &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)

Convert &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
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

source§

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

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.