Struct ClusterBroadphaseHit
One cluster a spatial query's broadphase admitted, reported without reading a single entity inside it.
public readonly struct ClusterBroadphaseHit
- Inherited Members
Remarks
This is the answer a caller wants when its unit of interest is the cluster, not the entity. A cluster is a spatially tight group of at most 64 entities, so "which clusters does this query reach" is the same question as "which entities" at a coarser grain — about 28 times coarser on a dense world — and a caller that can act on a whole cluster at once has no reason to pay the narrowphase that splits it back into entities.
It over-approximates, and that is the contract. Every entity the entity-level query would report lives in a cluster reported here, because a cluster's bounds enclose its entities; the converse does not hold, since a cluster straddling the query boundary is reported whole. A caller that needs the exact set runs the narrowphase on the clusters this reports; a caller that can afford the over-approximation never touches an entity at all.
Properties
ChunkId
The cluster's chunk id.
public int ChunkId { get; }
Property Value
MaxX
World-space maximum X.
public double MaxX { get; }
Property Value
MaxY
World-space maximum Y.
public double MaxY { get; }
Property Value
MinX
World-space minimum X of the cluster's tight bounds.
public double MinX { get; }
Property Value
MinY
World-space minimum Y.
public double MinY { get; }
Property Value
Slots
Its occupied slots, as the occupancy word read when the cluster was opened.
public ulong Slots { get; }