|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.awt.AbstractViewInputHandler
gov.nasa.worldwind.awt.BasicViewInputHandler
gov.nasa.worldwind.view.orbit.OrbitViewInputHandler
public class OrbitViewInputHandler
| Nested Class Summary | |
|---|---|
protected static class |
OrbitViewInputHandler.CollisionAwarePitchAccessor
CollisionAwarePitchAccessor implements an PropertyAccessor.AngleAccessor
interface onto the pitch property of an OrbitView. |
class |
OrbitViewInputHandler.ResetRollActionListener
Action handler to reset roll. |
| Field Summary | |
|---|---|
protected AnimationController |
gotoAnimControl
|
static String |
ORBITVIEW_RESET_ROLL
|
protected AnimationController |
uiAnimControl
|
protected static String |
VIEW_ANIM_APP
|
protected static String |
VIEW_ANIM_CENTER
|
protected static String |
VIEW_ANIM_HEADING
|
protected static String |
VIEW_ANIM_HEADING_PITCH
|
protected static String |
VIEW_ANIM_PAN
|
protected static String |
VIEW_ANIM_PITCH
|
protected static String |
VIEW_ANIM_POSITION
|
protected static String |
VIEW_ANIM_ROLL
|
protected static String |
VIEW_ANIM_ZOOM
|
| Constructor Summary | |
|---|---|
OrbitViewInputHandler()
Create a new input handler. |
|
| 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 |
addHeadingPitchRollAnimator(Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
Angle beginRoll,
Angle endRoll)
Add an animator to animate heading, pitch, and roll. |
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 |
addRollAnimator(Angle begin,
Angle end)
Add an animator to animate roll. |
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(PropertyChangeEvent e)
|
protected void |
handleViewStopped()
|
protected void |
initializeInputHandlers()
Initialize input handlers specific to ObitView. |
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 |
onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)
|
protected void |
onResetRoll(ViewInputAttributes.ActionAttributes actionAttribs)
Called when user input causes the roll to reset. |
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(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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AnimationController gotoAnimControl
public static final String ORBITVIEW_RESET_ROLL
protected AnimationController uiAnimControl
protected static final String VIEW_ANIM_APP
protected static final String VIEW_ANIM_CENTER
protected static final String VIEW_ANIM_HEADING
protected static final String VIEW_ANIM_HEADING_PITCH
protected static final String VIEW_ANIM_PAN
protected static final String VIEW_ANIM_PITCH
protected static final String VIEW_ANIM_POSITION
protected static final String VIEW_ANIM_ROLL
protected static final String VIEW_ANIM_ZOOM
| Constructor Detail |
|---|
public OrbitViewInputHandler()
| Method Detail |
|---|
public void addAnimator(Animator animator)
ViewInputHandlerAnimator 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 added
public void addCenterAnimator(Position begin,
Position end,
boolean smoothed)
public void addCenterAnimator(Position begin,
Position end,
long lengthMillis,
boolean smoothed)
public void addEyePositionAnimator(long timeToIterate,
Position beginPosition,
Position endPosition)
public void addFlyToZoomAnimator(Angle heading,
Angle pitch,
double zoom)
public void addHeadingAnimator(Angle begin,
Angle end)
public void addHeadingPitchRollAnimator(Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
Angle beginRoll,
Angle endRoll)
beginHeading - starting headingendHeading - final headingbeginPitch - starting pitchendPitch - final pitchbeginRoll - starting rollendRoll - final roll
public void addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom)
public void addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom,
boolean endCenterOnSurface)
public void addPanToAnimator(Position centerPos,
Angle heading,
Angle pitch,
double zoom,
long timeToMove,
boolean endCenterOnSurface)
public void addPanToAnimator(Position beginCenterPos,
Position endCenterPos,
Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
double beginZoom,
double endZoom,
boolean endCenterOnSurface)
public void addPanToAnimator(Position beginCenterPos,
Position endCenterPos,
Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch,
double beginZoom,
double endZoom,
long timeToMove,
boolean endCenterOnSurface)
public void addPitchAnimator(Angle begin,
Angle end)
public void addRollAnimator(Angle begin,
Angle end)
begin - starting rollend - final roll
public void addZoomAnimator(double zoomStart,
double zoomEnd)
public void apply()
apply in interface ViewInputHandlerapply in class BasicViewInputHandler
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)
public void goTo(Position lookAtPos,
double distance)
ViewInputHandlerView to look
at the given position from the given elevation.
goTo in interface ViewInputHandlergoTo in class BasicViewInputHandlerlookAtPos - The position to animate the view to look at.distance - The elevation to look at the position from.protected void handleOrbitViewCenterStopped()
protected void handlePropertyChange(PropertyChangeEvent e)
handlePropertyChange in class BasicViewInputHandlerprotected void handleViewStopped()
handleViewStopped in class BasicViewInputHandlerprotected void initializeInputHandlers()
public boolean isAnimating()
ViewInputHandlerView.
protected void onHorizontalTranslateAbs(Angle latitudeChange,
Angle longitudeChange,
ViewInputAttributes.ActionAttributes actionAttribs)
onHorizontalTranslateAbs in class BasicViewInputHandler
protected void onHorizontalTranslateRel(Angle forwardChange,
Angle sideChange,
ViewInputAttributes.ActionAttributes actionAttribs)
onHorizontalTranslateRel in class AbstractViewInputHandler
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.ActionAttributes actionAttribs)
onMoveTo in class BasicViewInputHandler
protected void onMoveTo(Position focalPosition,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttribs)
onMoveTo in class BasicViewInputHandlerprotected void onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
onResetHeading in class BasicViewInputHandlerprotected void onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)
onResetHeadingPitchRoll in class BasicViewInputHandlerprotected void onResetRoll(ViewInputAttributes.ActionAttributes actionAttribs)
actionAttribs - input that caused the change.
protected void onRotateView(Angle headingChange,
Angle pitchChange,
ViewInputAttributes.ActionAttributes actionAttribs)
onRotateView in class AbstractViewInputHandler
protected void onRotateView(double headingInput,
double pitchInput,
double totalHeadingInput,
double totalPitchInput,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
onRotateView in class AbstractViewInputHandler
protected void onVerticalTranslate(double translateChange,
double totalTranslateChange,
ViewInputAttributes.DeviceAttributes deviceAttributes,
ViewInputAttributes.ActionAttributes actionAttributes)
onVerticalTranslate in class AbstractViewInputHandler
protected void onVerticalTranslate(double translateChange,
ViewInputAttributes.ActionAttributes actionAttribs)
onVerticalTranslate in class BasicViewInputHandler
protected void setCenterPosition(BasicOrbitView view,
AnimationController animControl,
Position position,
ViewInputAttributes.ActionAttributes attrib)
protected void stopAllAnimators()
public void stopAnimators()
ViewInputHandlerView
protected void stopGoToAnimators()
protected void stopUserInputAnimators(Object... names)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||