Viewer - Interaction
    Preparing search index...

    Class LineConstraint

    The line constraint is used for dragging and allows the specification of a line along which objects can be dragged. The radius defines in which distance this constraint is being considered to be chosen from the constraints defined. The transformation and optional rotation of this constraint get applied to the node if it is the constraint with the closest distance to the ray that was used for the drag event. As this is a difficult topic, please visit our help desk section on interactions where we go through the process of setting everything up with examples.

    This class is deprecated and will be removed in the future. Please use the LineRestriction instead.

    Implements

    • IDragConstraint
    Index

    Constructors

    Accessors

    Constructors

    • Parameters

      • _point1: vec3

        the start point of the line

      • _point2: vec3

        the end point of the line

      • _radius: number = 0

        the radius in which the line is considered

      • Optional_rotation: { angle: number; axis: vec3 }

        the rotation in axis-angle representation that is applied to the node if the drag contraint becomes active

      Returns LineConstraint

    Accessors

    • get point1(): vec3

      Returns vec3

    • get point2(): vec3

      Returns vec3

    • get radius(): number

      Returns number

    • get rotation(): { angle: number; axis: vec3 } | undefined

      Returns { angle: number; axis: vec3 } | undefined