public class FlyViewInputHandler extends BasicViewInputHandler
Modifier and Type | Class and Description |
---|---|
class |
FlyViewInputHandler.ResetPitchActionListener |
class |
FlyViewInputHandler.RollActionListener
Input handler to handle user input that changes Roll.
|
BasicViewInputHandler.HorizontalTransActionListener, BasicViewInputHandler.HorizTransMouseActionListener, BasicViewInputHandler.MoveToMouseActionListener, BasicViewInputHandler.ResetHeadingActionListener, BasicViewInputHandler.ResetHeadingPitchActionListener, BasicViewInputHandler.RotateActionListener, BasicViewInputHandler.RotateMouseActionListener, BasicViewInputHandler.StopViewActionListener, BasicViewInputHandler.VerticalTransActionListener, BasicViewInputHandler.VertTransMouseActionListener, BasicViewInputHandler.VertTransMouseWheelActionListener
attributes, DEFAULT_DRAG_SLOPE_FACTOR, DEFAULT_PER_FRAME_INPUT_INTERVAL, dragSlopeFactor, enableSmoothing, GENERATE_EVENTS, keyActionMap, keyEventState, keyModsActionMap, lastMousePoint, lastPerFrameInputTime, lockHeading, modifierList, mouseActionMap, mouseDownModelview, mouseDownPoint, mouseDownProjection, mouseDownViewport, mouseModsActionMap, mousePoint, mouseWheelModsActionMap, NUM_MODIFIERS, perFrameInputInterval, QUERY_EVENTS, SCALE_FUNC_EYE_ALTITUDE, SCALE_FUNC_EYE_ALTITUDE_EXP, SCALE_FUNC_ZOOM, SCALE_FUNC_ZOOM_EXP, selectedPosition, stopOnFocusLost, wwd, wwdFocusOwner
Constructor and Description |
---|
FlyViewInputHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addAnimator(Animator animator)
Add an
Animator to this ViewInputHandler . |
void |
apply()
Implementations are expected to apply any changes to the
View state prior to the View
setting the modelview matrix for rendering the current frame. |
void |
goTo(Position lookAtPos,
double distance)
Animate to the specified position.
|
protected void |
handleViewStopped() |
boolean |
isAnimating()
Determine if there are any animations active in the
View . |
void |
lookAt(Position lookAtPos,
long timeToMove) |
protected void |
onHorizontalTranslateRel(Angle forwardChange,
Angle sideChange,
ViewInputAttributes.ActionAttributes actionAttribs) |
protected void |
onHorizontalTranslateRel(double forwardInput,
double sideInput,
double totalForwardInput,
double totalSideInput,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes) |
protected void |
onMoveTo(Position focalPosition,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttribs) |
protected void |
onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs) |
protected void |
onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs) |
protected void |
onResetPitch(ViewInputAttributes.ActionAttributes actionAttribs) |
protected void |
onRoll(Angle rollChange,
ViewInputAttributes.ActionAttributes actionAttribs)
Called when the roll changes due to user input.
|
protected void |
onRoll(double rollInput,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
Called when the roll changes due to user input.
|
protected void |
onRotateView(Angle headingChange,
Angle pitchChange,
ViewInputAttributes.ActionAttributes actionAttribs) |
protected void |
onRotateView(double headingInput,
double pitchInput,
double totalHeadingInput,
double totalPitchInput,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes) |
protected void |
onVerticalTranslate(double translateChange,
double totalTranslateChange,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttribs) |
protected void |
setEyePosition(AnimationController animControl,
View view,
Position position,
ViewInputAttributes.ActionAttributes attrib) |
protected void |
setHeading(View view,
AnimationController animControl,
Angle heading,
ViewInputAttributes.ActionAttributes attrib) |
protected void |
setPitch(View view,
AnimationController animControl,
Angle pitch,
ViewInputAttributes.ActionAttributes attrib) |
protected void |
setRoll(View view,
AnimationController animControl,
Angle roll,
ViewInputAttributes.ActionAttributes attrib)
Set the roll in a view.
|
void |
stopAnimators()
Stops any animations that are active in this
View |
protected void |
stopGoToAnimators() |
protected void |
stopUserInputAnimators() |
callActionListener, callActionListListeners, callActionListListeners, callMouseActionListListeners, callMouseWheelActionListListeners, handleKeyPressed, handleMouseClicked, handleMouseDragged, handleMouseWheelMoved, handlePerFrameKeyState, handlePerFrameMouseState, handlePropertyChange
computeDragSlope, computeSelectedPointAt, computeSelectedPosition, constrainToSourceBounds, evaluateScaleFuncEyeAltitude, evaluateScaleFuncZoom, focusGained, focusLost, getAttributes, getChangeInLocation, getDragSlopeFactor, getLastMousePoint, getMouseDownPoint, getMousePoint, getPerFrameInputInterval, getScaledValue, getScaleValue, getScaleValueElevation, getSelectedPosition, getView, getWorldWindow, handleFocusGained, handleFocusLost, handleKeyReleased, handleMouseMoved, handleMousePressed, handleMouseReleased, handlePerFrameAnimation, isEnableSmoothing, isLockHeading, isStopOnFocusLost, isWorldWindowFocusOwner, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, onStopView, propertyChange, rawInputToChangeInValue, setAttributes, setDragSlopeFactor, setEnableSmoothing, setLockHeading, setMouseDownPoint, setMouseDownView, setPerFrameInputInterval, setSelectedPosition, setStopOnFocusLost, setWorldWindow, setWorldWindowFocusOwner, updateMousePoint, viewApplied
protected static final java.lang.String ACTION_RESET_PITCH
protected static final double DEFAULT_KEY_HORIZONTAL_TRANSLATE_MAX_VALUE
protected static final double DEFAULT_KEY_HORIZONTAL_TRANSLATE_MAX_VALUE_SLOW
protected static final double DEFAULT_KEY_HORIZONTAL_TRANSLATE_MIN_VALUE
protected static final double DEFAULT_KEY_HORIZONTAL_TRANSLATE_MIN_VALUE_SLOW
protected static final double DEFAULT_KEY_TRANSLATE_SMOOTHING_VALUE
protected static final double DEFAULT_KEY_VERTICAL_TRANSLATE_MAX_VALUE
protected static final double DEFAULT_KEY_VERTICAL_TRANSLATE_MIN_VALUE
protected static double DEFAULT_MOUSE_HORIZONTAL_TRANSLATE_MAX_VALUE
protected static double DEFAULT_MOUSE_HORIZONTAL_TRANSLATE_MIN_VALUE
protected static final double DEFAULT_MOUSE_ROTATE_MAX_VALUE
protected static final double DEFAULT_MOUSE_ROTATE_MIN_VALUE
protected static final double DEFAULT_MOUSE_VERTICAL_TRANSLATE_MAX_VALUE
protected static final double DEFAULT_MOUSE_VERTICAL_TRANSLATE_MIN_VALUE
protected static final double DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MAX
protected static final double DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MAX_OSX
protected static final double DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MIN
protected static final double DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MIN_OSX
protected static final ViewInputAttributes.ActionAttributes.KeyAction DEFAULT_RESET_PITCH_KEY_ACT
public static final ViewInputAttributes.ActionAttributes.KeyAction[] resetPitchEvents
protected static final java.lang.String VIEW_ANIM_APP
protected static final java.lang.String VIEW_ANIM_HEADING
protected static final java.lang.String VIEW_ANIM_PAN
protected static final java.lang.String VIEW_ANIM_PITCH
protected static final java.lang.String VIEW_ANIM_POSITION
protected static final java.lang.String VIEW_ANIM_ROLL
public void addAnimator(Animator animator)
ViewInputHandler
Animator
to this ViewInputHandler
.
This method does not start the Animator
. Starting the
Animator
is the responsibility of the application.
This method is here primarily for use by the View
. Applications should call
View.addAnimator(gov.nasa.worldwind.animation.Animator)
to add an animtion to the
view.animator
- the Animator
to be addedpublic void apply()
ViewInputHandler
View
state prior to the View
setting the modelview matrix for rendering the current frame.apply
in interface ViewInputHandler
apply
in class BasicViewInputHandler
public void goTo(Position lookAtPos, double distance)
ViewInputHandler
View
to look
at the given position from the given elevation.lookAtPos
- The position to animate the view to look at.distance
- The elevation to look at the position
from.protected void handleViewStopped()
handleViewStopped
in class BasicViewInputHandler
public boolean isAnimating()
ViewInputHandler
View
.public void lookAt(Position lookAtPos, long timeToMove)
protected void onHorizontalTranslateRel(Angle forwardChange, Angle sideChange, ViewInputAttributes.ActionAttributes actionAttribs)
protected void onHorizontalTranslateRel(double forwardInput, double sideInput, double totalForwardInput, double totalSideInput, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
onHorizontalTranslateRel
in class BasicViewInputHandler
protected void onMoveTo(Position focalPosition, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttribs)
onMoveTo
in class BasicViewInputHandler
protected void onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
onResetHeading
in class BasicViewInputHandler
protected void onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)
onResetHeadingPitchRoll
in class BasicViewInputHandler
protected void onResetPitch(ViewInputAttributes.ActionAttributes actionAttribs)
protected void onRoll(Angle rollChange, ViewInputAttributes.ActionAttributes actionAttribs)
rollChange
- Change in roll.actionAttribs
- Action that caused the change.protected void onRoll(double rollInput, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
rollInput
- Change in roll.deviceAttributes
- Attributes of the input device.actionAttributes
- Action that caused the change.protected void onRotateView(Angle headingChange, Angle pitchChange, ViewInputAttributes.ActionAttributes actionAttribs)
protected void onRotateView(double headingInput, double pitchInput, double totalHeadingInput, double totalPitchInput, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
onRotateView
in class BasicViewInputHandler
protected void onVerticalTranslate(double translateChange, double totalTranslateChange, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttribs)
onVerticalTranslate
in class BasicViewInputHandler
protected void setEyePosition(AnimationController animControl, View view, Position position, ViewInputAttributes.ActionAttributes attrib)
protected void setHeading(View view, AnimationController animControl, Angle heading, ViewInputAttributes.ActionAttributes attrib)
protected void setPitch(View view, AnimationController animControl, Angle pitch, ViewInputAttributes.ActionAttributes attrib)
protected void setRoll(View view, AnimationController animControl, Angle roll, ViewInputAttributes.ActionAttributes attrib)
view
- View to modify.animControl
- Animator controller for the view.roll
- new roll value.attrib
- action that caused the roll to change.public void stopAnimators()
ViewInputHandler
View
protected void stopGoToAnimators()
protected void stopUserInputAnimators()