gov.nasa.worldwind.view.firstperson
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, PropertyChangeListener, 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).
| 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 |
| 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.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, finalize, 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 |
DEFAULT_MAX_ELEVATION
protected static final double DEFAULT_MAX_ELEVATION
- See Also:
- Constant Field Values
DEFAULT_MAX_PITCH
protected static final Angle DEFAULT_MAX_PITCH
DEFAULT_MIN_ELEVATION
protected static final double DEFAULT_MIN_ELEVATION
- See Also:
- Constant Field Values
DEFAULT_MIN_PITCH
protected static final Angle DEFAULT_MIN_PITCH
BasicFlyView
public BasicFlyView()
afterDoApply
protected void afterDoApply()
doApply
protected void doApply(DrawContext dc)
- Overrides:
doApply in class BasicView
getModelViewMatrix
public Matrix getModelViewMatrix(Position eyePosition,
Position centerPosition)
getViewState
public ViewUtil.ViewState getViewState(Position eyePosition,
Position centerPosition)
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 interface View- Overrides:
setEyePosition in class BasicView
- Parameters:
eyePosition - the eye position.
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 interface View- Overrides:
setHeading in class BasicView
- 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
- Specified by:
setPitch in interface View- Overrides:
setPitch in class BasicView
- Parameters:
pitch - The pitch of the view.
setViewPropertyLimits
public void setViewPropertyLimits(ViewPropertyLimits limits)
setViewState
protected void setViewState(ViewUtil.ViewState viewState)
- Overrides:
setViewState in class BasicView