Class SnapData

The SnapData type contains the result of a scene picking action.

Constructors

Properties

_closestEdge: Vector3
_closestVertex: Vector3
_lodGroupIndex: number
_normal: Vector3
_pickedFace: number
_pickedVertex: number
_position: Vector3
_vertex0: Vector3
_vertex1: Vector3
_vertex2: Vector3

Accessors

  • get closestEdge(): Vector3
  • Point on edge closest to the pick position.

    Returns Vector3

  • get closestVertex(): Vector3
  • Vertex closest to the pick position.

    Returns Vector3

  • get lodGroupIndex(): number
  • The LOD group index of the picked mesh.

    Returns number

  • get normal(): Vector3
  • The normal to the object surface at the snapping point.

    Returns Vector3

  • get pickedFace(): number
  • Index of picked face if enabled.

    Returns number

  • get pickedVertex(): number
  • Position of picked vertex in index buffer. For triangles this is usually 3 * faceIndex + [0..2]

    Returns number

  • get position(): Vector3
  • The world position on the surface of the object.

    Returns Vector3

  • get vertex0(): Vector3
  • World coordinates of the first triangle vertex.

    Returns Vector3

  • get vertex1(): Vector3
  • World coordinates of the second triangle vertex.

    Returns Vector3

  • get vertex2(): Vector3
  • World coordinates of the third triangle vertex.

    Returns Vector3

Methods

  • Clones this instance and returns a new SnapData with identical values.

    Returns SnapData

  • Determines if this SnapData instance is equal to the other instance.

    Parameters

    Returns boolean