pub struct SpatialHash { /* private fields */ }Expand description
Eski SpatialHash API’sini Dynamic BVH üzerine köprüler. FIX-4: clear artık &mut self alıyor.
Implementations§
Source§impl SpatialHash
impl SpatialHash
pub fn new(_cell_size: f32) -> Self
pub fn insert(&mut self, entity: Entity, aabb: Aabb)
pub fn update(&mut self, entity: Entity, aabb: Aabb)
pub fn remove(&mut self, entity: Entity)
pub fn query_pairs(&self) -> Vec<(Entity, Entity)>
pub fn query_aabb(&self, aabb: Aabb) -> Vec<Entity>
pub fn query_point(&self, point: Vec3, radius: f32) -> Vec<Entity>
pub fn query_ray( &self, origin: Vec3, dir: Vec3, max_t: f32, ) -> Vec<(Entity, f32)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpatialHash
impl RefUnwindSafe for SpatialHash
impl Send for SpatialHash
impl Sync for SpatialHash
impl Unpin for SpatialHash
impl UnsafeUnpin for SpatialHash
impl UnwindSafe for SpatialHash
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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