Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IDragConstraintUtils

Hierarchy

  • IDragConstraintUtils

Index

Methods

  • intersect(dragConstraints: {}, viewport: IViewportApi, node: ITreeNode, ray: IRay): { matrix: mat4; dragAnchor?: IDragAnchor; dragConstraint?: IDragConstraint }
  • Intersect the provided drag constraints with the ray provided. Returns a matrix with the transformation of the node. The selection of the drag constraint works by taking the one with the closest distance to the ray.

    It returns the dragConstraints that were used and the matrix that was calculated. If no dragConstraint was used, this entry is left empty.

    Parameters

    Returns { matrix: mat4; dragAnchor?: IDragAnchor; dragConstraint?: IDragConstraint }

    • matrix: mat4
    • Optional dragAnchor?: IDragAnchor
    • Optional dragConstraint?: IDragConstraint
  • Setup the provided drag constraints. The drag origin is set here and a first computation of the matrix is done.

    It returns the dragConstraints that were used and the matrix that was calculated. If no dragConstraint was used, this entry is left empty.

    Parameters

    Returns { matrix: mat4; dragAnchor?: IDragAnchor; dragConstraint?: IDragConstraint }

    • matrix: mat4
    • Optional dragAnchor?: IDragAnchor
    • Optional dragConstraint?: IDragConstraint