SparseHashGridCollisionProcessor
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
options: { size: number }
size: number
Returns SparseHashGridCollisionProcessor
Properties
public_pairPool
readonlygridSize
readonlyhashGrid
Methods
broadphase
debug
Draws the internal data structure
Parameters
ex: ExcaliburGraphicsContext
elapsedMs: number
Returns void
getColliders
Get all tracked colliders
Returns readonly Collider[]
narrowphase
Runs a fine grain pass on collision pairs and does geometry intersection tests producing any contacts
Parameters
pairs: Pair[]
optionalstats: FrameStats
Returns CollisionContact[]
query
rayCast
Parameters
ray: Ray
optionaloptions: RayCastOptions
Returns RayCastHit[]
track
Adds the collider to the internal data structure for collision tracking
Parameters
target: Collider
Returns void
untrack
Removes a collider from the internal data structure for tracking collisions
Parameters
target: Collider
Returns void
update
Perform data structure maintenance, returns number of colliders updated
Parameters
targets: Collider[]
elapsedMs: number
Returns number
This collision processor uses a sparsely populated grid of uniform cells to bucket potential colliders together for the purpose of detecting collision pairs and collisions.