Table of Contents

Class ClusterSpatialQueryExtensions

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

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

engine DatabaseEngine

The database engine.

Returns

ClusterSpatialQuery<TArch>

A zero-allocation query handle.

Type Parameters

TArch

The 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

engine DatabaseEngine

The database engine.

realm RealmId

The realm to query. Must be registered.

Returns

ClusterSpatialQuery<TArch>

A zero-allocation query handle.

Type Parameters

TArch

The archetype type.

Exceptions

InvalidOperationException

Thrown when the archetype is not cluster-eligible, has no spatial component, or the realm is not registered.