Class ClusterSpatialQueryExtensions
Construction helpers for ClusterSpatialQuery<TArch>. Exposed on DatabaseEngine so callers can write
dbe.ClusterSpatialQuery{TArch}().AABB(...).
public static class ClusterSpatialQueryExtensions
- Inheritance
-
ClusterSpatialQueryExtensions
- Inherited Members
Methods
ClusterSpatialQuery<TArch>(DatabaseEngine)
Create a per-cell cluster AABB query for the given archetype.
public static ClusterSpatialQuery<TArch> ClusterSpatialQuery<TArch>(this DatabaseEngine engine) where TArch : Archetype<TArch>, new()
Parameters
engineDatabaseEngineThe database engine.
Returns
- ClusterSpatialQuery<TArch>
A zero-allocation query handle.
Type Parameters
TArchThe archetype type.
Exceptions
- InvalidOperationException
Thrown when the archetype is not cluster-eligible or has no spatial component.
ClusterSpatialQuery<TArch>(DatabaseEngine, RealmId)
Create a per-cell cluster query for the given archetype in realm realm: it sees only that realm's entities, however their
coordinates compare with another realm's.
public static ClusterSpatialQuery<TArch> ClusterSpatialQuery<TArch>(this DatabaseEngine engine, RealmId realm) where TArch : Archetype<TArch>, new()
Parameters
engineDatabaseEngineThe database engine.
realmRealmIdThe realm to query. Must be registered.
Returns
- ClusterSpatialQuery<TArch>
A zero-allocation query handle.
Type Parameters
TArchThe archetype type.
Exceptions
- InvalidOperationException
Thrown when the archetype is not cluster-eligible, has no spatial component, or the realm is not registered.