gov.nasa.worldwind.view.orbit
Class OrbitViewInputHandler
java.lang.Object
gov.nasa.worldwind.awt.AbstractViewInputHandler
gov.nasa.worldwind.awt.BasicViewInputHandler
gov.nasa.worldwind.view.orbit.OrbitViewInputHandler
- All Implemented Interfaces:
- ViewInputHandler, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.beans.PropertyChangeListener, java.util.EventListener
public class OrbitViewInputHandler
- extends BasicViewInputHandler
| Nested classes/interfaces inherited from class gov.nasa.worldwind.awt.BasicViewInputHandler |
BasicViewInputHandler.HorizontalTransActionListener, BasicViewInputHandler.HorizTransMouseActionListener, BasicViewInputHandler.MoveToMouseActionListener, BasicViewInputHandler.ResetHeadingActionListener, BasicViewInputHandler.ResetHeadingPitchActionListener, BasicViewInputHandler.RotateActionListener, BasicViewInputHandler.RotateMouseActionListener, BasicViewInputHandler.StopViewActionListener, BasicViewInputHandler.VerticalTransActionListener, BasicViewInputHandler.VertTransMouseActionListener, BasicViewInputHandler.VertTransMouseWheelActionListener |
| Fields inherited from class gov.nasa.worldwind.awt.AbstractViewInputHandler |
GENERATE_EVENTS, keyActionMap, keyModsActionMap, modifierList, mouseActionMap, mouseModsActionMap, mouseWheelModsActionMap, NUM_MODIFIERS, QUERY_EVENTS, SCALE_FUNC_EYE_ALTITUDE, SCALE_FUNC_EYE_ALTITUDE_EXP, SCALE_FUNC_ZOOM, SCALE_FUNC_ZOOM_EXP |
|
Method Summary |
void |
addAnimator(Animator animator)
Add an Animator to this ViewInputHandler. |
void |
addCenterAnimator(Position begin,
Position end,
boolean smoothed)
|
void |
addCenterAnimator(Position begin,
Position end,
long lengthMillis,
boolean smoothed)
|
void |
addEyePositionAnimator(long timeToIterate,
Position beginPosition,
Position endPosition)
|
void |
addFlyToZoomAnimator(Angle heading,
Angle pitch,
double zoom)
|
void |
addHeadingAnimator(Angle begin,
Angle end)
|
void |
addHeadingPitchAnimator(Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch)
|
void |
addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom)
|
void |
addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom,
boolean endCenterOnSurface)
|
void |
addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom,
long timeToMove,
boolean endCenterOnSurface)
|
void |
addPanToAnimator(Position beginCenterPos,
Position endCenterPos,
Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
double beginZoom,
double endZoom,
boolean endCenterOnSurface)
|
void |
addPanToAnimator(Position beginCenterPos,
Position endCenterPos,
Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
double beginZoom,
double endZoom,
long timeToMove,
boolean endCenterOnSurface)
|
void |
addPitchAnimator(Angle begin,
Angle end)
|
void |
addZoomAnimator(double zoomStart,
double zoomEnd)
|
void |
apply()
Apply the changes prior to rendering a frame. |
protected void |
changeHeading(BasicOrbitView view,
AnimationController animControl,
Angle change,
ViewInputAttributes.ActionAttributes attrib)
|
protected void |
changePitch(BasicOrbitView view,
AnimationController animControl,
Angle change,
ViewInputAttributes.ActionAttributes attrib)
|
protected void |
changeZoom(BasicOrbitView view,
AnimationController animControl,
double change,
ViewInputAttributes.ActionAttributes attrib)
|
protected static Angle |
computeNewHeading(Angle heading,
OrbitViewLimits limits)
|
protected static Angle |
computeNewPitch(Angle pitch,
OrbitViewLimits limits)
|
protected static Position |
computeNewPosition(Position position,
OrbitViewLimits limits)
|
protected static double |
computeNewZoom(double curZoom,
double change,
OrbitViewLimits limits)
|
protected double |
getScaleValueHorizTransRel(ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
|
protected double |
getScaleValueRotate(ViewInputAttributes.ActionAttributes actionAttributes)
|
protected double |
getScaleValueZoom(ViewInputAttributes.ActionAttributes actionAttributes)
|
void |
goTo(Position lookAtPos,
double distance)
Animate to the specified position. |
protected void |
handleOrbitViewCenterStopped()
|
protected void |
handlePropertyChange(java.beans.PropertyChangeEvent e)
|
protected void |
handleViewStopped()
|
boolean |
isAnimating()
Determine if there are any animations active in the View. |
protected void |
onHorizontalTranslateAbs(Angle latitudeChange,
Angle longitudeChange,
ViewInputAttributes.ActionAttributes actionAttribs)
|
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.ActionAttributes actionAttribs)
|
protected void |
onMoveTo(Position focalPosition,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttribs)
|
protected void |
onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
|
protected void |
onResetHeadingAndPitch(ViewInputAttributes.ActionAttributes actionAttribs)
|
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 actionAttributes)
|
protected void |
onVerticalTranslate(double translateChange,
ViewInputAttributes.ActionAttributes actionAttribs)
|
protected void |
setCenterPosition(BasicOrbitView view,
AnimationController animControl,
Position position,
ViewInputAttributes.ActionAttributes attrib)
|
protected void |
stopAllAnimators()
|
void |
stopAnimators()
Stops any animations that are active in this View |
protected void |
stopGoToAnimators()
|
protected void |
stopUserInputAnimators(java.lang.Object... names)
|
| Methods inherited from class gov.nasa.worldwind.awt.BasicViewInputHandler |
callActionListListeners, callActionListListeners, callMouseActionListListeners, callMouseWheelActionListListeners, handleKeyPressed, handleMouseClicked, handleMouseDragged, handleMouseWheelMoved, handlePerFrameKeyState, handlePerFrameMouseState, onHorizontalTranslateRel, onRotateView, onRotateView, onVerticalTranslate |
| Methods inherited from class gov.nasa.worldwind.awt.AbstractViewInputHandler |
callActionListener, computeDragSlope, computeSelectedPointAt, computeSelectedPosition, constrainToSourceBounds, evaluateScaleFuncEyeAltitude, evaluateScaleFuncZoom, focusGained, focusLost, getAttributes, getChangeInLocation, getDragSlopeFactor, getLastMousePoint, getMouseDownPoint, getMousePoint, getScaledValue, getScaleValue, getScaleValueElevation, getSelectedPosition, getView, getWorldWindow, handleFocusGained, handleFocusLost, handleKeyReleased, handleMouseMoved, handleMousePressed, handleMouseReleased, isEnableSmoothing, isLockHeading, isStopOnFocusLost, isWorldWindowFocusOwner, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, onStopView, propertyChange, rawInputToChangeInValue, setAttributes, setDragSlopeFactor, setEnableSmoothing, setLockHeading, setMouseDownPoint, setSelectedPosition, setStopOnFocusLost, setWorldWindow, setWorldWindowFocusOwner, updateMousePoint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gotoAnimControl
protected AnimationController gotoAnimControl
uiAnimControl
protected AnimationController uiAnimControl
VIEW_ANIM_APP
protected static final java.lang.String VIEW_ANIM_APP
- See Also:
- Constant Field Values
VIEW_ANIM_CENTER
protected static final java.lang.String VIEW_ANIM_CENTER
- See Also:
- Constant Field Values
VIEW_ANIM_HEADING
protected static final java.lang.String VIEW_ANIM_HEADING
- See Also:
- Constant Field Values
VIEW_ANIM_HEADING_PITCH
protected static final java.lang.String VIEW_ANIM_HEADING_PITCH
- See Also:
- Constant Field Values
VIEW_ANIM_PAN
protected static final java.lang.String VIEW_ANIM_PAN
- See Also:
- Constant Field Values
VIEW_ANIM_PITCH
protected static final java.lang.String VIEW_ANIM_PITCH
- See Also:
- Constant Field Values
VIEW_ANIM_POSITION
protected static final java.lang.String VIEW_ANIM_POSITION
- See Also:
- Constant Field Values
VIEW_ANIM_ZOOM
protected static final java.lang.String VIEW_ANIM_ZOOM
- See Also:
- Constant Field Values
OrbitViewInputHandler
public OrbitViewInputHandler()
addAnimator
public void addAnimator(Animator animator)
- Description copied from interface:
ViewInputHandler
- Add an
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.
- Parameters:
animator - the Animator to be added
addCenterAnimator
public void addCenterAnimator(Position begin,
Position end,
boolean smoothed)
addCenterAnimator
public void addCenterAnimator(Position begin,
Position end,
long lengthMillis,
boolean smoothed)
addEyePositionAnimator
public void addEyePositionAnimator(long timeToIterate,
Position beginPosition,
Position endPosition)
addFlyToZoomAnimator
public void addFlyToZoomAnimator(Angle heading,
Angle pitch,
double zoom)
addHeadingAnimator
public void addHeadingAnimator(Angle begin,
Angle end)
addHeadingPitchAnimator
public void addHeadingPitchAnimator(Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch)
addPanToAnimator
public void addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom)
addPanToAnimator
public void addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom,
boolean endCenterOnSurface)
addPanToAnimator
public void addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom,
long timeToMove,
boolean endCenterOnSurface)
addPanToAnimator
public void addPanToAnimator(Position beginCenterPos,
Position endCenterPos,
Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
double beginZoom,
double endZoom,
boolean endCenterOnSurface)
addPanToAnimator
public void addPanToAnimator(Position beginCenterPos,
Position endCenterPos,
Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
double beginZoom,
double endZoom,
long timeToMove,
boolean endCenterOnSurface)
addPitchAnimator
public void addPitchAnimator(Angle begin,
Angle end)
addZoomAnimator
public void addZoomAnimator(double zoomStart,
double zoomEnd)
apply
public void apply()
- Apply the changes prior to rendering a frame.
The method will step animators, applying the results of those steps to the View, then
if a focus on terrain is required, it will do that as well.
- Specified by:
apply in interface ViewInputHandler- Overrides:
apply in class BasicViewInputHandler
changeHeading
protected void changeHeading(BasicOrbitView view,
AnimationController animControl,
Angle change,
ViewInputAttributes.ActionAttributes attrib)
changePitch
protected void changePitch(BasicOrbitView view,
AnimationController animControl,
Angle change,
ViewInputAttributes.ActionAttributes attrib)
changeZoom
protected void changeZoom(BasicOrbitView view,
AnimationController animControl,
double change,
ViewInputAttributes.ActionAttributes attrib)
computeNewHeading
protected static Angle computeNewHeading(Angle heading,
OrbitViewLimits limits)
computeNewPitch
protected static Angle computeNewPitch(Angle pitch,
OrbitViewLimits limits)
computeNewPosition
protected static Position computeNewPosition(Position position,
OrbitViewLimits limits)
computeNewZoom
protected static double computeNewZoom(double curZoom,
double change,
OrbitViewLimits limits)
getScaleValueHorizTransRel
protected double getScaleValueHorizTransRel(ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
getScaleValueRotate
protected double getScaleValueRotate(ViewInputAttributes.ActionAttributes actionAttributes)
getScaleValueZoom
protected double getScaleValueZoom(ViewInputAttributes.ActionAttributes actionAttributes)
goTo
public void goTo(Position lookAtPos,
double distance)
- Description copied from interface:
ViewInputHandler
- Animate to the specified position. The implementation is expected to animate the
View to look
at the given position from the given elevation.
- Specified by:
goTo in interface ViewInputHandler- Overrides:
goTo in class BasicViewInputHandler
- Parameters:
lookAtPos - The position to animate the view to look at.distance - The elevation to look at the position from.
handleOrbitViewCenterStopped
protected void handleOrbitViewCenterStopped()
handlePropertyChange
protected void handlePropertyChange(java.beans.PropertyChangeEvent e)
- Overrides:
handlePropertyChange in class BasicViewInputHandler
handleViewStopped
protected void handleViewStopped()
- Overrides:
handleViewStopped in class BasicViewInputHandler
isAnimating
public boolean isAnimating()
- Description copied from interface:
ViewInputHandler
- Determine if there are any animations active in the
View.
- Returns:
- true if there are active animations, false otherwise.
onHorizontalTranslateAbs
protected void onHorizontalTranslateAbs(Angle latitudeChange,
Angle longitudeChange,
ViewInputAttributes.ActionAttributes actionAttribs)
- Overrides:
onHorizontalTranslateAbs in class BasicViewInputHandler
onHorizontalTranslateRel
protected void onHorizontalTranslateRel(Angle forwardChange,
Angle sideChange,
ViewInputAttributes.ActionAttributes actionAttribs)
- Specified by:
onHorizontalTranslateRel in class AbstractViewInputHandler
onHorizontalTranslateRel
protected void onHorizontalTranslateRel(double forwardInput,
double sideInput,
double totalForwardInput,
double totalSideInput,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
- Overrides:
onHorizontalTranslateRel in class BasicViewInputHandler
onMoveTo
protected void onMoveTo(Position focalPosition,
ViewInputAttributes.ActionAttributes actionAttribs)
- Overrides:
onMoveTo in class BasicViewInputHandler
onMoveTo
protected void onMoveTo(Position focalPosition,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttribs)
- Overrides:
onMoveTo in class BasicViewInputHandler
onResetHeading
protected void onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
- Overrides:
onResetHeading in class BasicViewInputHandler
onResetHeadingAndPitch
protected void onResetHeadingAndPitch(ViewInputAttributes.ActionAttributes actionAttribs)
- Overrides:
onResetHeadingAndPitch in class BasicViewInputHandler
onRotateView
protected void onRotateView(Angle headingChange,
Angle pitchChange,
ViewInputAttributes.ActionAttributes actionAttribs)
- Specified by:
onRotateView in class AbstractViewInputHandler
onRotateView
protected void onRotateView(double headingInput,
double pitchInput,
double totalHeadingInput,
double totalPitchInput,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
- Specified by:
onRotateView in class AbstractViewInputHandler
onVerticalTranslate
protected void onVerticalTranslate(double translateChange,
double totalTranslateChange,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
- Specified by:
onVerticalTranslate in class AbstractViewInputHandler
onVerticalTranslate
protected void onVerticalTranslate(double translateChange,
ViewInputAttributes.ActionAttributes actionAttribs)
- Overrides:
onVerticalTranslate in class BasicViewInputHandler
setCenterPosition
protected void setCenterPosition(BasicOrbitView view,
AnimationController animControl,
Position position,
ViewInputAttributes.ActionAttributes attrib)
stopAllAnimators
protected void stopAllAnimators()
stopAnimators
public void stopAnimators()
- Description copied from interface:
ViewInputHandler
- Stops any animations that are active in this
View
stopGoToAnimators
protected void stopGoToAnimators()
stopUserInputAnimators
protected void stopUserInputAnimators(java.lang.Object... names)