Class AbstractInteractWidget
java.lang.Object
com.ardor3d.extension.interact.widget.AbstractInteractWidget
- Direct Known Subclasses:
CompoundInteractWidget
,MoveMultiPlanarWidget
,MovePlanarWidget
,MoveWidget
,RotateWidget
,SimpleScaleWidget
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected Ray3
protected final Vector3
protected final Vector3
protected final Vector3
protected final Vector3
protected MouseButton
protected boolean
protected IFilterList
List of filters to modify state after applying input.protected boolean
protected Node
protected InteractMatrix
protected Spatial
protected Spatial
protected boolean
protected InteractMouseOverCallback
protected PrimitivePickResults
static double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFilter
(UpdateFilter filter) protected void
applyFilters
(InteractManager manager) void
beginDrag
(InteractManager manager) protected double
calculateHandleScale
(InteractManager manager) void
checkMouseOver
(Canvas source, MouseState current, InteractManager manager) boolean
checkShouldDrag
(Camera camera, MouseState current, MouseState previous, AtomicBoolean inputConsumed, InteractManager manager) void
void
endDrag
(InteractManager manager) protected void
protected Vector3
protected Pickable
protected void
getPickRay
(Vector2 mouseLoc, Camera camera) boolean
boolean
boolean
boolean
void
lostControl
(InteractManager manager) protected void
mouseDeparted
(Canvas source, MouseState current, InteractManager manager) protected void
mouseEntered
(Canvas source, MouseState current, InteractManager manager) void
processInput
(Canvas source, TwoInputStates inputStates, AtomicBoolean inputConsumed, InteractManager manager) Use the given input states to determine if and how to activate this widget.void
receivedControl
(InteractManager manager) void
removeFilter
(UpdateFilter filter) void
render
(Renderer renderer, InteractManager manager) void
setActiveInputOnly
(boolean activeOnly) void
setActiveRenderOnly
(boolean activeOnly) void
setActiveUpdateOnly
(boolean activeOnly) void
setDragButton
(MouseButton button) void
setFlipPickRay
(boolean flip) void
setInteractMatrix
(InteractMatrix matrix) void
void
targetChanged
(InteractManager manager) void
targetDataUpdated
(InteractManager manager) void
update
(ReadOnlyTimer timer, InteractManager manager)
-
Field Details
-
MIN_SCALE
public static double MIN_SCALE -
_handle
-
_flipPickRay
protected boolean _flipPickRay -
_dragging
protected boolean _dragging -
_mouseOver
protected boolean _mouseOver -
_dragButton
-
_activeInputOnly
protected boolean _activeInputOnly -
_activeRenderOnly
protected boolean _activeRenderOnly -
_activeUpdateOnly
protected boolean _activeUpdateOnly -
_calcRay
-
_calcVec3A
-
_calcVec3B
-
_calcVec3C
-
_calcVec3D
-
_results
-
_lastDragSpatial
-
_lastMouseOverSpatial
-
_interactMatrix
-
_filters
List of filters to modify state after applying input. -
_mouseOverCallback
-
-
Constructor Details
-
AbstractInteractWidget
-
-
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
-
checkMouseOver
-
mouseEntered
-
mouseDeparted
-
checkShouldDrag
public boolean checkShouldDrag(Camera camera, MouseState current, MouseState previous, AtomicBoolean inputConsumed, InteractManager manager) -
beginDrag
-
endDrag
-
update
-
calculateHandleScale
-
render
-
targetChanged
-
targetDataUpdated
-
receivedControl
-
lostControl
-
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
-
setDragButton
-
getHandle
-
getLastPick
-
getLastPickable
-
findPick
-
getPickRay
-
setInteractMatrix
-
getInteractMatrix
-
addFilter
-
removeFilter
-
clearFilters
public void clearFilters() -
setMouseOverCallback
-
getMouseOverCallback
-