Vixen
02b45cc4
csharp
public enum SnapElements

What a position may be rounded or moved onto.

Read the guide page for this →

Remarks

⚠ A set rather than a choice, because they compose and they compose in one direction. Holding vertex and surface at once is strictly better than either: a vertex snap only answers when there is a corner within reach, so falling through to the surface when there is not is what makes the pair a better drag rather than a mode switch. The order they are tried in is Vertex, EdgeCentre, Edge, Face — smallest first, which is the same innermost-wins rule SubObjectPicker uses and for the same reason.

Fields and properties (8)

  • None

    Nothing. A drag goes where the pointer says.

  • Increment

    Whole steps of the grid, measured from where the drag began.

  • Grid

    The world lattice itself, so everything dragged ends up on the same one.

  • Vertex

    A shared position of the geometry under the pointer.

  • Edge

    Anywhere along an edge of it.

  • EdgeCentre

    The midpoint of an edge, which is what a wall is centred on.

  • Face

    Wherever the view ray meets the surface.

  • Geometry

    The three that need geometry rather than arithmetic.

Used by (9)

  • EditorApplicationVixen.Editor.App
  • PrecisionTestsVixen.Editor.SceneView.Tests
  • SceneProbeVixen.Editor.SceneView
  • SnapCommandTestsVixen.Editor.App.Tests
  • SnapContextVixen.Editor.SceneView
  • SnapContextTestsVixen.Editor.SceneView.Tests
  • SnapHitVixen.Editor.SceneView
  • SnapTestsVixen.Editor.SceneView.Tests
  • ViewportIdsVixen.Editor.App