Vixen
02b45cc4
csharp
public sealed class SceneLines

Everything a viewport draws over the scene, collected once a frame.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Three sources: the grid, the entities, the gizmo. They are drawn together because they are nearly the same kind of thing — world-space geometry with no material — and collecting them here rather than in three places is what makes each of the passes below one buffer write and one draw call.

⚠ Three lists, and none of the splits is cosmetic. The grid and the markers are depth-tested so an entity behind a wall is behind it; the gizmo is not, because a handle you cannot reach through the thing it moves is a handle you cannot use. That much is two LineRenderers. The third is the gizmo's solid parts — the head on the end of each arm — which are triangles rather than segments and want MeshRenderer, so they cannot share a buffer with either of the other two however alike they look on screen.

An entity with no mesh is drawn as a marker. Until there is a mesh path in the editor that is every entity, and even after there is one it stays true for the lights, the cameras and the empties — which is what doc 11 means by visualisation gizmos.

Fields and properties (14)

  • public IReadOnlyList<LineVertex> World

    The segments drawn with the depth test on.

  • public IReadOnlyList<LineVertex> Overlay

    The segments drawn over everything.

  • public ReadOnlySpan<MeshVertex> Handles

    The gizmo's solid parts, drawn over everything.

  • public ReadOnlySpan<uint> HandleIndices

    Three indices per triangle, into Handles.

  • public float MarkerSize

    How big an entity's marker is, in world units.

  • public Color4 MarkerColour

    The colour of an entity that is not selected.

  • public Color4 ReferenceColour

    The colour of a reference volume's wireframe.

  • public Color4 MeasureColour

    The colour of the tape measure.

  • public Color4 SelectedColour

    The colour of a selected one.

  • public Color4 VolumeColour

    What an unselected post-process volume is drawn in.

  • public Color4 CageColour

    The colour the edit cage — every edge of the mesh being edited — is drawn in.

  • public Color4 ElementColour

    The colour a selected element is drawn in.

  • public Color4 HoverColour

    The colour the element under the pointer is drawn in.

  • public float VertexSize

    How big a vertex handle is, in render pixels.

Methods (1)

Used by (4)

  • ComponentGizmoTestsVixen.Editor.SceneView.Tests
  • LightTestsVixen.Editor.SceneView.Tests
  • ScenePresenterVixen.Editor.App
  • ViewportStateTestsVixen.Editor.SceneView.Tests