pub struct StaticBroadphase<const D: usize> { /* private fields */ }Expand description
Cached broadphase state for Static and Kinematic bodies.
Rebuilt only when a static/kinematic body is added or removed (dirty flag).
This avoids including immovable geometry in the per-frame LBVH rebuild,
which is O(n log n) in the total body count.
For scenes with many static bodies (terrain, walls) and few dynamic bodies, this typically halves or better the broadphase cost.
Implementations§
Source§impl<const D: usize> StaticBroadphase<D>
impl<const D: usize> StaticBroadphase<D>
Trait Implementations§
Auto Trait Implementations§
impl<const D: usize> Freeze for StaticBroadphase<D>
impl<const D: usize> RefUnwindSafe for StaticBroadphase<D>
impl<const D: usize> Send for StaticBroadphase<D>
impl<const D: usize> Sync for StaticBroadphase<D>
impl<const D: usize> Unpin for StaticBroadphase<D>
impl<const D: usize> UnsafeUnpin for StaticBroadphase<D>
impl<const D: usize> UnwindSafe for StaticBroadphase<D>
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
Mutably borrows from an owned value. Read more
Source§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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.