Table of Contents

Class GridTraceVisualizer

Namespace
GridForge.Utility

Unity Scene View visualizer for topology-aware GridForge trace coverage.

[ExecuteAlways]
[AddComponentMenu("GridForge/Debugging/Grid Trace Visualizer")]
public class GridTraceVisualizer : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
GridTraceVisualizer
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.MemberwiseClone()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Properties

EndTransform

Gets or sets the trace end transform.

public Transform EndTransform { get; set; }

Property Value

Transform

LastTracedGridCount

Gets the grid count from the most recent gizmo trace.

public int LastTracedGridCount { get; }

Property Value

int

LastTracedVoxelCount

Gets the voxel count from the most recent gizmo trace.

public int LastTracedVoxelCount { get; }

Property Value

int

LayerY

Gets the Y layer used for XZ tracing.

public Fixed64 LayerY { get; }

Property Value

Fixed64

StartTransform

Gets or sets the trace start transform.

public Transform StartTransform { get; set; }

Property Value

Transform

TraceMode

Gets the active trace projection mode.

public GridTraceMode TraceMode { get; }

Property Value

GridTraceMode

Methods

ConfigureTraceMode(GridTraceMode, Fixed64)

Configures the trace projection and optional XZ layer.

public void ConfigureTraceMode(GridTraceMode mode, Fixed64 layerY = default)

Parameters

mode GridTraceMode

The trace projection mode.

layerY Fixed64

The Y layer used by XZ tracing.

GetTraceVoxelsInto(GridWorld, Vector3d, Vector3d, SwiftList<Voxel>)

Collects the voxels covered by a trace into an existing list.

public int GetTraceVoxelsInto(GridWorld world, Vector3d start, Vector3d end, SwiftList<Voxel> results)

Parameters

world GridWorld

The active world to trace.

start Vector3d

The trace start position.

end Vector3d

The trace end position.

results SwiftList<Voxel>

The destination list, which is cleared before use.

Returns

int

The number of collected voxels.

TryGetFirstTraceDiagnosticCell(GridWorld, Vector3d, Vector3d, out GridDiagnosticCell)

Tries to create a diagnostic descriptor for the first traced voxel.

public bool TryGetFirstTraceDiagnosticCell(GridWorld world, Vector3d start, Vector3d end, out GridDiagnosticCell cell)

Parameters

world GridWorld

The active world to trace.

start Vector3d

The trace start position.

end Vector3d

The trace end position.

cell GridDiagnosticCell

Receives the first diagnostic cell.

Returns

bool

true when the trace covers a voxel.