pub struct SpatialHashGrid {
pub cell_size: Real,
/* private fields */
}Expand description
A spatial hash grid for broad-phase collision detection.
The grid divides world space into cells of size cell_size. Each body
occupies one or more cells; candidate pairs are extracted by looking up
all bodies in the same cell.
Fields§
§cell_size: RealCell size in world units.
Implementations§
Trait Implementations§
Source§impl Debug for SpatialHashGrid
impl Debug for SpatialHashGrid
Source§impl Default for SpatialHashGrid
impl Default for SpatialHashGrid
Source§fn default() -> SpatialHashGrid
fn default() -> SpatialHashGrid
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpatialHashGrid
impl RefUnwindSafe for SpatialHashGrid
impl Send for SpatialHashGrid
impl Sync for SpatialHashGrid
impl Unpin for SpatialHashGrid
impl UnsafeUnpin for SpatialHashGrid
impl UnwindSafe for SpatialHashGrid
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.