Search in sources :

Example 1 with DragMode

use of maspack.render.Dragger3d.DragMode in project artisynth_core by artisynth.

the class GLMouseAdapter method updateDraggerModeAndFlags.

private void updateDraggerModeAndFlags(int mods, Dragger3d dragger) {
    dragger.clearFlags();
    int draggerFlags = 0;
    Dragger3d.DragMode dragMode = Dragger3d.DragMode.OFF;
    if ((mods & draggerConstrainMask) == draggerConstrainMask) {
        draggerFlags |= Dragger3d.CONSTRAIN;
    }
    if ((mods & draggerRepositionMask) == draggerRepositionMask) {
        draggerFlags |= Dragger3d.REPOSITION;
        dragMode = Dragger3d.DragMode.REPOSITION;
    } else if ((mods & draggerDragMask) == draggerDragMask) {
        dragMode = Dragger3d.DragMode.DRAG;
    }
    dragger.setDragMode(dragMode);
    dragger.setFlags(draggerFlags);
}
Also used : DragMode(maspack.render.Dragger3d.DragMode) Point(java.awt.Point) Dragger3d(maspack.render.Dragger3d)

Aggregations

Point (java.awt.Point)1 Dragger3d (maspack.render.Dragger3d)1 DragMode (maspack.render.Dragger3d.DragMode)1