Table of Contents

Struct GridDiagnosticUnityVisitor

Namespace
GridForge.Utility

Streams diagnostic cells into Unity gizmos while exposing query counts.

public struct GridDiagnosticUnityVisitor : IGridDiagnosticCellVisitor
Implements
Inherited Members

Constructors

GridDiagnosticUnityVisitor(bool, Color, Color, Color, Color, Color, Color)

Creates a Unity diagnostic visitor.

public GridDiagnosticUnityVisitor(bool drawGizmos, Color emptyCellColor, Color occupiedCellColor, Color blockedCellColor, Color boundaryCellColor, Color partitionedCellColor, Color missingSparseAddressColor)

Parameters

drawGizmos bool

Whether visited cells are drawn as gizmos.

emptyCellColor Color

The color for empty cells.

occupiedCellColor Color

The color for occupied cells.

blockedCellColor Color

The color for blocked cells.

boundaryCellColor Color

The color for boundary cells.

partitionedCellColor Color

The color for partitioned cells.

missingSparseAddressColor Color

The color for missing sparse addresses.

Properties

LastCell

Gets the last visited diagnostic cell.

public readonly GridDiagnosticCell LastCell { get; }

Property Value

GridDiagnosticCell

LastEdgeCount

Gets the edge count of the last visited cell.

public readonly int LastEdgeCount { get; }

Property Value

int

LastVertexCount

Gets the vertex count of the last visited cell.

public readonly int LastVertexCount { get; }

Property Value

int

MissingSparseAddressCellCount

Gets the number of visited missing sparse addresses.

public readonly int MissingSparseAddressCellCount { get; }

Property Value

int

PhysicalCellCount

Gets the number of visited physical cells.

public readonly int PhysicalCellCount { get; }

Property Value

int

VisitedCellCount

Gets the total number of visited diagnostic cells.

public readonly int VisitedCellCount { get; }

Property Value

int

Methods

CreateCountingOnly()

Creates a visitor that counts cells without drawing gizmos.

public static GridDiagnosticUnityVisitor CreateCountingOnly()

Returns

GridDiagnosticUnityVisitor

The counting-only visitor.

Visit(in GridDiagnosticCell)

Visits, counts, and optionally draws a diagnostic cell.

public bool Visit(in GridDiagnosticCell cell)

Parameters

cell GridDiagnosticCell

The diagnostic cell.

Returns

bool

true to continue enumeration.