Class GridDiagnosticGizmoDrawer
Converts GridForge diagnostic geometry into Unity gizmo primitives.
public static class GridDiagnosticGizmoDrawer
- Inheritance
-
GridDiagnosticGizmoDrawer
- Inherited Members
Methods
CreatePhysicalCell(GridWorld, VoxelGrid, Voxel)
Creates a physical-cell diagnostic descriptor for a voxel.
public static GridDiagnosticCell CreatePhysicalCell(GridWorld world, VoxelGrid grid, Voxel voxel)
Parameters
worldGridWorldThe owning world.
gridVoxelGridThe owning grid.
voxelVoxelThe voxel to describe.
Returns
- GridDiagnosticCell
The physical-cell descriptor.
DrawWireCell(in GridDiagnosticCell, Color)
Draws a diagnostic cell as a Unity wire gizmo.
public static void DrawWireCell(in GridDiagnosticCell cell, Color color)
Parameters
cellGridDiagnosticCellThe diagnostic cell.
colorColorThe gizmo color.
GetEdgeCount(in GridDiagnosticCell)
Gets the edge count required to draw a diagnostic cell.
public static int GetEdgeCount(in GridDiagnosticCell cell)
Parameters
cellGridDiagnosticCellThe diagnostic cell.
Returns
- int
The required edge count.
GetVertexCount(in GridDiagnosticCell)
Gets the vertex count required to draw a diagnostic cell.
public static int GetVertexCount(in GridDiagnosticCell cell)
Parameters
cellGridDiagnosticCellThe diagnostic cell.
Returns
- int
The required vertex count.
WriteUnityVertices(in GridDiagnosticCell, Span<Vector3>)
Writes the diagnostic cell geometry as Unity vertices.
public static int WriteUnityVertices(in GridDiagnosticCell cell, Span<Vector3> vertices)
Parameters
cellGridDiagnosticCellThe diagnostic cell.
verticesSpan<Vector3>The destination span.
Returns
- int
The number of vertices written, or zero when the destination is too small.