class SceneGrid

Inherits: IScriptExportable

Handles rendering of the grid in the scene view.

Public

Constructors

SceneGrid

SceneGrid(const HCamera &camera)

Methods

~SceneGrid

~SceneGrid() noexcept = default

SetSize

void SetSize(u32 size)

Sets the total width/height of the grid in XZ plane.

SetSpacing

void SetSpacing(float spacing)

Sets the spacing between grid lines.

SetMode

void SetMode(GridMode mode)

Determines in what position and orientation is the grid drawn.

SetSettings

void SetSettings(const SPtr<EditorSettings> &settings)

Changes the active editor settings.

Grid properties will be updated internally when editor settings change.

Draw

void Draw()

Called once per frame.

Queues commands to render the grid to the render thread.

Private

Methods

UpdateFromEditorSettings

void UpdateFromEditorSettings()

Updates internal grid parameters from the attached settings object.

UpdateGridMesh

void UpdateGridMesh()

Rebuilds the scene grid mesh.

Call this whenever grid parameters change.

Fields

mSpacing

float mSpacing

mSize

u32 mSize

mMode

GridMode mMode

mRenderThreadDataDirty

bool mRenderThreadDataDirty

mSettings

SPtr<EditorSettings> mSettings

mSettingsHash

u32 mSettingsHash

mGridMesh

HMesh mGridMesh

mVertexDesc

SPtr<VertexDescription> mVertexDesc

mRenderer