class

Flock::Collision::SpatialHash2D

Inherits Flock::Collision::Broadphase2D < Reference < Object

Uniform spatial-hash broadphase. Buckets bodies by the grid cells their AABB overlaps; good for evenly-sized colliders. cell ~ a typical collider size.

Constructors

new(cell : Number = 1.0)
Source

Instance methods

cell
Source
clear
Source
collect_pairs
Source
insert(index : Int32, aabb : AABB2D) : Nil
Source