Class BasicFlyView
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.view.BasicView
-
- gov.nasa.worldwind.view.firstperson.BasicFlyView
-
- All Implemented Interfaces:
AVList
,MessageListener
,Restorable
,View
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class BasicFlyView extends BasicView
This is a basic view that implements a yaw-pitch-roll model that can be applied to first-person style view applications (such as flight simulation).Note that the pitch angle is defined as normal to the ground plane, not parallel as in most body axis representations. This is to be consistent with the definition of pitch within WorldWind. Applications will need to correct for pitch values by adding 90 degrees when commanding pitch (i.e. to get a horizontal view, enter 90 degrees pitch. To get straight down, enter 0 degrees).
-
-
Field Summary
Fields Modifier and Type Field Description protected static double
DEFAULT_MAX_ELEVATION
protected static Angle
DEFAULT_MAX_PITCH
protected static double
DEFAULT_MIN_ELEVATION
protected static Angle
DEFAULT_MIN_PITCH
-
Fields inherited from class gov.nasa.worldwind.view.BasicView
COLLISION_NUM_ITERATIONS, COLLISION_THRESHOLD, dc, DEFAULT_DEPTH_RESOLUTION, detectCollisions, eyePosition, farClipDistance, fieldOfView, frustum, globe, hadCollisions, heading, horizonDistance, lastEyePoint, lastEyePosition, lastForwardVector, lastFrustumInModelCoords, lastUpVector, MINIMUM_FAR_DISTANCE, MINIMUM_NEAR_DISTANCE, modelview, modelviewInv, nearClipDistance, pitch, projection, roll, viewInputHandler, viewLimits, viewport, viewStateID
-
Fields inherited from interface gov.nasa.worldwind.View
VIEW_STOPPED
-
-
Constructor Summary
Constructors Constructor Description BasicFlyView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterDoApply()
protected void
doApply(DrawContext dc)
Matrix
getModelViewMatrix(Position eyePosition, Position centerPosition)
ViewUtil.ViewState
getViewState(Position eyePosition, Position centerPosition)
protected void
loadConfigurationValues()
void
setEyePosition(Position eyePosition)
Sets the geographic position of the eye.void
setHeading(Angle heading)
Sets the heading of the view.void
setPitch(Angle pitch)
Sets the pitch of the view.void
setViewPropertyLimits(ViewPropertyLimits limits)
protected void
setViewState(ViewUtil.ViewState viewState)
-
Methods inherited from class gov.nasa.worldwind.view.BasicView
addAnimator, apply, computeEyePositionFromModelview, computeFarClipDistance, computeFarDistance, computeHorizonDistance, computeHorizonDistance, computeNearClipDistance, computeNearDistance, computePixelSizeAtDistance, computePositionFromScreenPoint, computeRayFromScreenPoint, copyViewState, doGetRestorableState, doRestoreState, getCenterPoint, getCenterPosition, getCurrentEyePoint, getCurrentEyePosition, getCurrentForwardVector, getDC, getEyePoint, getEyePosition, getFarClipDistance, getFieldOfView, getForwardVector, getFrustum, getFrustumInModelCoordinates, getGlobe, getHeading, getHorizonDistance, getModelviewMatrix, getNearClipDistance, getPitch, getProjectionMatrix, getRestorableState, getRoll, getUpVector, getViewInputHandler, getViewport, getViewPropertyLimits, getViewStateID, goTo, hadCollisions, isAnimating, isDetectCollisions, loadGLViewState, popReferenceCenter, project, project, pushReferenceCenter, restoreState, setDetectCollisions, setFarClipDistance, setFieldOfView, setGlobe, setNearClipDistance, setOrientation, setReferenceCenter, setRoll, setViewInputHandler, stopAnimations, stopMovement, unProject, unProject, updateModelViewStateID
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
-
-
-
-
Field Detail
-
DEFAULT_MIN_ELEVATION
protected static final double DEFAULT_MIN_ELEVATION
- See Also:
- Constant Field Values
-
DEFAULT_MAX_ELEVATION
protected static final double DEFAULT_MAX_ELEVATION
- See Also:
- Constant Field Values
-
DEFAULT_MIN_PITCH
protected static final Angle DEFAULT_MIN_PITCH
-
DEFAULT_MAX_PITCH
protected static final Angle DEFAULT_MAX_PITCH
-
-
Method Detail
-
loadConfigurationValues
protected void loadConfigurationValues()
-
setEyePosition
public void setEyePosition(Position eyePosition)
Description copied from interface:View
Sets the geographic position of the eye.- Specified by:
setEyePosition
in interfaceView
- Overrides:
setEyePosition
in classBasicView
- Parameters:
eyePosition
- the eye position.
-
getViewState
public ViewUtil.ViewState getViewState(Position eyePosition, Position centerPosition)
-
doApply
protected void doApply(DrawContext dc)
-
afterDoApply
protected void afterDoApply()
-
setViewState
protected void setViewState(ViewUtil.ViewState viewState)
- Overrides:
setViewState
in classBasicView
-
setHeading
public void setHeading(Angle heading)
Description copied from interface:View
Sets the heading of the view. The implementation may interpret this command in whatever way it chooses.- Specified by:
setHeading
in interfaceView
- Overrides:
setHeading
in classBasicView
- Parameters:
heading
- The direction to aim the view in degrees
-
setPitch
public void setPitch(Angle pitch)
Description copied from interface:View
Sets the pitch of the view. The implementation may interpret pitch as it chooses
-
setViewPropertyLimits
public void setViewPropertyLimits(ViewPropertyLimits limits)
-
-