Table of Contents

Struct GridDiagnosticQuery

Namespace
GridForge.Diagnostics
Assembly
GridForge.dll

Immutable filter and budget settings for a diagnostic cell query.

public readonly struct GridDiagnosticQuery
Inherited Members

Constructors

GridDiagnosticQuery(ushort?, GridTopologyKind?, GridStorageKind?, GridDiagnosticAddressMode, GridDiagnosticCellState, GridDiagnosticCellState, Vector3d?, Vector3d?, int, bool)

Initializes a diagnostic query.

public GridDiagnosticQuery(ushort? gridIndex = null, GridTopologyKind? topologyKind = null, GridStorageKind? storageKind = null, GridDiagnosticAddressMode addressMode = GridDiagnosticAddressMode.PhysicalOnly, GridDiagnosticCellState requiredStates = GridDiagnosticCellState.None, GridDiagnosticCellState excludedStates = GridDiagnosticCellState.None, Vector3d? boundsMin = null, Vector3d? boundsMax = null, int maxCells = 65536, bool allowFullAddressSpaceScan = false)

Parameters

gridIndex ushort?
topologyKind GridTopologyKind?
storageKind GridStorageKind?
addressMode GridDiagnosticAddressMode
requiredStates GridDiagnosticCellState
excludedStates GridDiagnosticCellState
boundsMin Vector3d?
boundsMax Vector3d?
maxCells int
allowFullAddressSpaceScan bool

Fields

AddressMode

Selects whether the query should return physical cells, missing sparse address cells, or both.

public readonly GridDiagnosticAddressMode AddressMode

Field Value

GridDiagnosticAddressMode

AllowFullAddressSpaceScan

Allows missing sparse address-space queries to scan the whole grid address space when no bounds are supplied.

public readonly bool AllowFullAddressSpaceScan

Field Value

bool

BoundsMax

Optional world-space maximum bounds for the query.

public readonly Vector3d? BoundsMax

Field Value

Vector3d?

BoundsMin

Optional world-space minimum bounds for the query.

public readonly Vector3d? BoundsMin

Field Value

Vector3d?

DefaultMaxCells

Default maximum number of diagnostic cells returned by a single query.

public const int DefaultMaxCells = 65536

Field Value

int

ExcludedStates

State flags that exclude a cell from the result.

public readonly GridDiagnosticCellState ExcludedStates

Field Value

GridDiagnosticCellState

GridIndex

Optional world-local grid slot filter.

public readonly ushort? GridIndex

Field Value

ushort?

MaxCells

Maximum number of cells this query may return before it is stopped.

public readonly int MaxCells

Field Value

int

RequiredStates

State flags that a returned cell must contain.

public readonly GridDiagnosticCellState RequiredStates

Field Value

GridDiagnosticCellState

StorageKind

Optional storage-kind filter.

public readonly GridStorageKind? StorageKind

Field Value

GridStorageKind?

TopologyKind

Optional topology filter.

public readonly GridTopologyKind? TopologyKind

Field Value

GridTopologyKind?

Methods

AllPhysical()

Creates a query that returns physical cells from all active grids.

public static GridDiagnosticQuery AllPhysical()

Returns

GridDiagnosticQuery

ForBounds(Vector3d, Vector3d)

Creates a physical-cell query clipped to world-space bounds.

public static GridDiagnosticQuery ForBounds(Vector3d min, Vector3d max)

Parameters

min Vector3d
max Vector3d

Returns

GridDiagnosticQuery

ForGrid(ushort)

Creates a physical-cell query for one world-local grid slot.

public static GridDiagnosticQuery ForGrid(ushort gridIndex)

Parameters

gridIndex ushort

Returns

GridDiagnosticQuery