#[repr(i32)]
pub enum PxBroadPhaseType { Sap = 0, Mbp = 1, Abp = 2, Pabp = 3, Gpu = 4, Last = 5, }
Expand description

Broad phase algorithm used in the simulation

eSAP is a good generic choice with great performance when many objects are sleeping. Performance can degrade significantly though, when all objects are moving, or when large numbers of objects are added to or removed from the broad phase. This algorithm does not need world bounds to be defined in order to work.

eMBP is an alternative broad phase algorithm that does not suffer from the same performance issues as eSAP when all objects are moving or when inserting large numbers of objects. However its generic performance when many objects are sleeping might be inferior to eSAP, and it requires users to define world bounds in order to work.

eABP is a revisited implementation of MBP, which automatically manages broad-phase regions. It offers the convenience of eSAP (no need to define world bounds or regions) and the performance of eMBP when a lot of objects are moving. While eSAP can remain faster when most objects are sleeping and eMBP can remain faster when it uses a large number of properly-defined regions, eABP often gives the best performance on average and the best memory usage.

ePABP is a parallel implementation of ABP. It can often be the fastest (CPU) broadphase, but it can use more memory than ABP.

eGPU is a GPU implementation of the incremental sweep and prune approach. Additionally, it uses a ABP-style initial pair generation approach to avoid large spikes when inserting shapes. It not only has the advantage of traditional SAP approch which is good for when many objects are sleeping, but due to being fully parallel, it also is great when lots of shapes are moving or for runtime pair insertion and removal. It can become a performance bottleneck if there are a very large number of shapes roughly projecting to the same values on a given axis. If the scene has a very large number of shapes in an actor, e.g. a humanoid, it is recommended to use an aggregate to represent multi-shape or multi-body actors to minimize stress placed on the broad phase.

Variants§

§

Sap = 0

3-axes sweep-and-prune

§

Mbp = 1

Multi box pruning

§

Abp = 2

Automatic box pruning

§

Pabp = 3

Parallel automatic box pruning

§

Gpu = 4

GPU broad phase

§

Last = 5

Trait Implementations§

source§

impl Clone for PxBroadPhaseType

source§

fn clone(&self) -> PxBroadPhaseType

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 PxBroadPhaseType

source§

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

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

impl PartialEq for PxBroadPhaseType

source§

fn eq(&self, other: &PxBroadPhaseType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for PxBroadPhaseType

source§

impl Eq for PxBroadPhaseType

source§

impl StructuralEq for PxBroadPhaseType

source§

impl StructuralPartialEq for PxBroadPhaseType

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