Class AbstractInteractWidget

java.lang.Object
com.ardor3d.extension.interact.widget.AbstractInteractWidget
Direct Known Subclasses:
CompoundInteractWidget, MoveMultiPlanarWidget, MovePlanarWidget, MoveWidget, RotateWidget, SimpleScaleWidget

public abstract class AbstractInteractWidget extends Object
  • Field Details

    • MIN_SCALE

      public static double MIN_SCALE
    • _handle

      protected Node _handle
    • _flipPickRay

      protected boolean _flipPickRay
    • _dragging

      protected boolean _dragging
    • _mouseOver

      protected boolean _mouseOver
    • _dragButton

      protected MouseButton _dragButton
    • _activeInputOnly

      protected boolean _activeInputOnly
    • _activeRenderOnly

      protected boolean _activeRenderOnly
    • _activeUpdateOnly

      protected boolean _activeUpdateOnly
    • _calcRay

      protected Ray3 _calcRay
    • _calcVec3A

      protected final Vector3 _calcVec3A
    • _calcVec3B

      protected final Vector3 _calcVec3B
    • _calcVec3C

      protected final Vector3 _calcVec3C
    • _calcVec3D

      protected final Vector3 _calcVec3D
    • _results

      protected PrimitivePickResults _results
    • _lastDragSpatial

      protected Spatial _lastDragSpatial
    • _lastMouseOverSpatial

      protected Spatial _lastMouseOverSpatial
    • _interactMatrix

      protected InteractMatrix _interactMatrix
    • _filters

      protected IFilterList _filters
      List of filters to modify state after applying input.
    • _mouseOverCallback

      protected InteractMouseOverCallback _mouseOverCallback
  • Constructor Details

    • AbstractInteractWidget

      public AbstractInteractWidget(IFilterList filterList)
  • Method Details

    • processInput

      public void processInput(Canvas source, TwoInputStates inputStates, AtomicBoolean inputConsumed, InteractManager manager)
      Use the given input states to determine if and how to activate this widget. If the widget uses the given input, inputConsumed should be set to "true" and applyFilters should be called by this method.
      Parameters:
      source - the canvas that is our input source.
      inputStates - the current and previous state of our input devices.
      inputConsumed - an atomic boolean used to indicate back to the caller of this function that we have consumed the given inputStates. If set to true, no other widgets will be offered this input, nor will any other scene input triggers attached to the manager.
      manager - our interact manager.
    • applyFilters

      protected void applyFilters(InteractManager manager)
    • checkMouseOver

      public void checkMouseOver(Canvas source, MouseState current, InteractManager manager)
    • mouseEntered

      protected void mouseEntered(Canvas source, MouseState current, InteractManager manager)
    • mouseDeparted

      protected void mouseDeparted(Canvas source, MouseState current, InteractManager manager)
    • checkShouldDrag

      public boolean checkShouldDrag(Camera camera, MouseState current, MouseState previous, AtomicBoolean inputConsumed, InteractManager manager)
    • beginDrag

      public void beginDrag(InteractManager manager)
    • endDrag

      public void endDrag(InteractManager manager)
    • update

      public void update(ReadOnlyTimer timer, InteractManager manager)
    • calculateHandleScale

      protected double calculateHandleScale(InteractManager manager)
    • render

      public void render(Renderer renderer, InteractManager manager)
    • targetChanged

      public void targetChanged(InteractManager manager)
    • targetDataUpdated

      public void targetDataUpdated(InteractManager manager)
    • receivedControl

      public void receivedControl(InteractManager manager)
    • lostControl

      public void lostControl(InteractManager manager)
    • isActiveInputOnly

      public boolean isActiveInputOnly()
    • setActiveInputOnly

      public void setActiveInputOnly(boolean activeOnly)
    • isActiveRenderOnly

      public boolean isActiveRenderOnly()
    • setActiveRenderOnly

      public void setActiveRenderOnly(boolean activeOnly)
    • isActiveUpdateOnly

      public boolean isActiveUpdateOnly()
    • setActiveUpdateOnly

      public void setActiveUpdateOnly(boolean activeOnly)
    • isFlipPickRay

      public boolean isFlipPickRay()
    • setFlipPickRay

      public void setFlipPickRay(boolean flip)
    • getDragButton

      public MouseButton getDragButton()
    • setDragButton

      public void setDragButton(MouseButton button)
    • getHandle

      public Node getHandle()
    • getLastPick

      protected Vector3 getLastPick()
    • getLastPickable

      protected Pickable getLastPickable()
    • findPick

      protected void findPick(Vector2 mouseLoc, Camera camera)
    • getPickRay

      protected void getPickRay(Vector2 mouseLoc, Camera camera)
    • setInteractMatrix

      public void setInteractMatrix(InteractMatrix matrix)
    • getInteractMatrix

      public InteractMatrix getInteractMatrix()
    • addFilter

      public void addFilter(UpdateFilter filter)
    • removeFilter

      public void removeFilter(UpdateFilter filter)
    • clearFilters

      public void clearFilters()
    • setMouseOverCallback

      public void setMouseOverCallback(InteractMouseOverCallback callback)
    • getMouseOverCallback

      public InteractMouseOverCallback getMouseOverCallback()