RSX Code Reference
    Preparing search index...

    Class SnapData

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

    Index
    _closestEdge: Vector3
    _closestVertex: Vector3
    _normal: Vector3
    _pickedFace: number
    _pickedVertex: number
    _position: Vector3
    _vertex0: Vector3
    _vertex1: Vector3
    _vertex2: Vector3
    • 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 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

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

      Returns SnapData