|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.view.BasicView
gov.nasa.worldwind.view.orbit.BasicOrbitView
public class BasicOrbitView
| Field Summary | |
|---|---|
protected Position |
center
|
protected OrbitViewCollisionSupport |
collisionSupport
|
protected double |
zoom
|
| Fields inherited from class gov.nasa.worldwind.view.BasicView |
|---|
COLLISION_NUM_ITERATIONS, COLLISION_THRESHOLD, dc, detectCollisions, eyePosition, farClipDistance, fieldOfView, frustum, globe, hadCollisions, heading, lastEyePoint, lastEyePosition, lastForwardVector, lastFrustumInModelCoords, lastUpVector, MINIMUM_FAR_DISTANCE, MINIMUM_NEAR_DISTANCE, modelview, modelviewInv, nearClipDistance, pitch, projection, roll, viewInputHandler, viewLimits, viewport |
| Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
changeSupport |
| Fields inherited from interface gov.nasa.worldwind.view.orbit.OrbitView |
|---|
CENTER_STOPPED |
| Fields inherited from interface gov.nasa.worldwind.View |
|---|
VIEW_STOPPED |
| Constructor Summary | |
|---|---|
BasicOrbitView()
|
|
| Method Summary | |
|---|---|
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 zoomAmount)
|
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)
|
protected void |
afterDoApply()
|
boolean |
canFocusOnTerrainCenter()
|
boolean |
canFocusOnViewportCenter()
Determines if the BasicOrbitView can be focused on the viewport center focusOnViewportCenter(). |
void |
computeAndSetViewCenter()
computes and sets the center of rotation for heading and pitch changes. |
void |
computeAndSetViewCenterIfNeeded()
computes and sets the center of rotation for heading and pitch changes, if it is needed. |
protected Position |
computeEyePositionFromModelview()
|
double |
computeHorizonDistance()
Gets the distance from the View's eye point to the horizon point on the last rendered
Globe. |
protected double |
computeHorizonDistance(Position eyePosition)
|
double |
computePixelSizeAtDistance(double distance)
Computes the dimension (in meters) that a screen pixel would cover at a given distance from the eye point (also in meters). |
Position |
computePositionFromScreenPoint(double x,
double y)
Computes the intersection of a line originating from the eye point (passing throught (x, y)) with the last rendered SectorGeometry, or the last analytical Globe if no rendered geometry exists. |
Line |
computeRayFromScreenPoint(double x,
double y)
Computes a line, in model coordinates, originating from the eye point, and passing throught the point contained by (x, y) on the View's projection plane (or after projection into model space). |
void |
copyViewState(View view)
Copy the state of the given View. |
protected void |
doApply(DrawContext dc)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
flagHadCollisions()
|
void |
focusOnTerrainCenter()
|
void |
focusOnViewportCenter()
sets the point of rotation for heading and pitch changes to the surface position at the viewport center. |
Vec4 |
getCenterPoint()
Gets the center point of the view. |
Position |
getCenterPosition()
Get the center position of the OrbitView. |
Vec4 |
getCurrentEyePoint()
Returns the most up-to-date location of the eye in cartesian coordinates. |
Position |
getCurrentEyePosition()
Returns the most up-to-date location of the eye in geographic coordintes. |
Position |
getEyePosition()
Returns the location of the eye in geographic coordinates. |
OrbitViewLimits |
getOrbitViewLimits()
Returns the OrbitViewLimits that apply to this OrbitView. |
double |
getZoom()
Get the zoom value for the OrbitView. |
void |
goTo(Position position,
double distance)
Animate to the specified position. |
protected void |
legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
Restores state values from previous versions of the BasicObitView state XML. |
static Position |
normalizedCenterPosition(Position unnormalizedPosition)
|
static Angle |
normalizedHeading(Angle unnormalizedHeading)
|
static Angle |
normalizedPitch(Angle unnormalizedPitch)
|
Vec4 |
project(Vec4 modelPoint)
Maps a Point in model (cartesian) coordinates to a Point in screen coordinates. |
protected void |
resolveCollisionsWithPitch()
|
void |
setCenterPosition(Position center)
Sets the center position of the OrbitView. |
void |
setEyePosition(Position eyePosition)
Sets the location of the eye in geographic coordinates. |
void |
setHeading(Angle heading)
Sets the heading of the view. |
protected void |
setModelCoordinates(OrbitViewInputSupport.OrbitViewState modelCoords)
|
void |
setOrbitViewLimits(OrbitViewLimits viewLimits)
Sets the OrbitViewLimits that will apply to this OrbitView. |
void |
setOrientation(Position eyePosition,
Position centerPosition)
Sets the location of the eye, and the center of the screen in geographic coordinates. |
void |
setPitch(Angle pitch)
Sets the pitch of the view. |
void |
setViewOutOfFocus(boolean b)
Alerts the BasicOrbitView that the view requires the point of rotation for heading and pitch changes to be' recalculate. |
void |
setZoom(double zoom)
Set the zoom value for the OrbitVeiw. |
void |
stopMovementOnCenter()
Stop any changes to the center position. |
Vec4 |
unProject(Vec4 windowPoint)
Maps a Point in screen coordinates to a Point in model coordinates. |
protected boolean |
validateModelCoordinates(OrbitViewInputSupport.OrbitViewState modelCoords)
|
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, 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.view.orbit.OrbitView |
|---|
hadCollisions, isDetectCollisions, setDetectCollisions |
| Methods inherited from interface gov.nasa.worldwind.View |
|---|
addAnimator, apply, getEyePoint, getFarClipDistance, getFieldOfView, getForwardVector, getFrustum, getFrustumInModelCoordinates, getGlobe, getHeading, getModelviewMatrix, getNearClipDistance, getPitch, getProjectionMatrix, getUpVector, getViewInputHandler, getViewport, getViewPropertyLimits, isAnimating, popReferenceCenter, pushReferenceCenter, setFieldOfView, stopAnimations, stopMovement |
| 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 java.beans.PropertyChangeListener |
|---|
propertyChange |
| Methods inherited from interface gov.nasa.worldwind.Restorable |
|---|
getRestorableState, restoreState |
| Field Detail |
|---|
protected Position center
protected final OrbitViewCollisionSupport collisionSupport
protected double zoom
| Constructor Detail |
|---|
public BasicOrbitView()
| Method Detail |
|---|
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 zoomAmount)
public void addHeadingAnimator(Angle begin,
Angle end)
public void addHeadingPitchAnimator(Angle beginHeading,
Angle endHeading,
Angle beginPitch,
Angle endPitch)
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 addZoomAnimator(double zoomStart,
double zoomEnd)
protected void afterDoApply()
public boolean canFocusOnTerrainCenter()
public boolean canFocusOnViewportCenter()
focusOnViewportCenter().
Focusing on the viewport center requires a non-null Globe,
a non-null DrawContext, and the viewport center is on the terrain.
canFocusOnViewportCenter in interface OrbitViewpublic void computeAndSetViewCenter()
public void computeAndSetViewCenterIfNeeded()
protected Position computeEyePositionFromModelview()
computeEyePositionFromModelview in class BasicViewpublic double computeHorizonDistance()
ViewView's eye point to the horizon point on the last rendered
Globe.
computeHorizonDistance in interface ViewcomputeHorizonDistance in class BasicViewprotected double computeHorizonDistance(Position eyePosition)
computeHorizonDistance in class BasicViewpublic double computePixelSizeAtDistance(double distance)
View
computePixelSizeAtDistance in interface ViewcomputePixelSizeAtDistance in class BasicViewdistance - the distance in meters from the eye point. This value must be positive but is otherwise
unbounded.
public Position computePositionFromScreenPoint(double x,
double y)
ViewSectorGeometry, or the last analytical Globe if no rendered geometry exists.
computePositionFromScreenPoint in interface ViewcomputePositionFromScreenPoint in class BasicViewx - the horizontal coordinate originating from the left side of View's projection plane.y - the vertical coordinate originating from the top of View's projection plane.
public Line computeRayFromScreenPoint(double x,
double y)
ViewView's projection plane (or after projection into model space).
computeRayFromScreenPoint in interface ViewcomputeRayFromScreenPoint in class BasicViewx - the horizontal coordinate originating from the left side of View's projection plane.y - the vertical coordinate originating from the top of View's projection plane.
View's eye point and passing throught (x, y) transformed into model
space.public void copyViewState(View view)
ViewView.
copyViewState in interface ViewcopyViewState in class BasicViewview - The View whose state is to be copied.protected void doApply(DrawContext dc)
doApply in class BasicView
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
doGetRestorableState in class BasicView
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
doRestoreState in class BasicViewprotected void flagHadCollisions()
public void focusOnTerrainCenter()
public void focusOnViewportCenter()
focusOnViewportCenter in interface OrbitViewpublic Vec4 getCenterPoint()
View
getCenterPoint in interface ViewgetCenterPoint in class BasicViewpublic Position getCenterPosition()
OrbitView
getCenterPosition in interface OrbitViewgetCenterPosition in class BasicViewpublic Vec4 getCurrentEyePoint()
ViewView.getEyePosition() and View.getEyePoint(),
getCurrentEyePoint will return the View's immediate position.
getCurrentEyePoint in interface ViewgetCurrentEyePoint in class BasicViewpublic Position getCurrentEyePosition()
ViewView.getEyePosition() and View.getEyePoint(),
getCurrentEyePosition will return the View's immediate position.
getCurrentEyePosition in interface ViewgetCurrentEyePosition in class BasicViewpublic Position getEyePosition()
Viewapply.
getEyePosition in interface ViewgetEyePosition in class BasicViewpublic OrbitViewLimits getOrbitViewLimits()
OrbitViewLimits that apply to this OrbitView. Incoming parameters to the
methods setCenterPosition, setHeading, setPitch, or setZoom are be limited by the parameters defined in this
OrbitViewLimits.
getOrbitViewLimits in interface OrbitViewOrbitViewLimits that apply to this OrbitViewpublic double getZoom()
OrbitView
getZoom in interface OrbitView
public void goTo(Position position,
double distance)
ViewView to look
at the given position from the given elevation.
goTo in interface ViewgoTo in class BasicViewposition - The position to animate to.distance - The elevation to look at the position from.
protected void legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
doRestoreState(gov.nasa.worldwind.util.RestorableSupport, gov.nasa.worldwind.util.RestorableSupport.StateObject).
rs - RestorableSupport object which contains the state value properties.context - active context in the RestorableSupport to read state from.public static Position normalizedCenterPosition(Position unnormalizedPosition)
public static Angle normalizedHeading(Angle unnormalizedHeading)
public static Angle normalizedPitch(Angle unnormalizedPitch)
public Vec4 project(Vec4 modelPoint)
ViewPoint in model (cartesian) coordinates to a Point in screen coordinates. The
returned x and y are relative to the lower left hand screen corner, while z is the screen depth-coordinate. If
the model point cannot be sucessfully mapped, this will return null.
project in interface Viewproject in class BasicViewmodelPoint - the model coordinate Point to project.
Point.protected void resolveCollisionsWithPitch()
public void setCenterPosition(Position center)
OrbitView
setCenterPosition in interface OrbitViewpublic void setEyePosition(Position eyePosition)
VieweyePosition.
setEyePosition in interface ViewsetEyePosition in class BasicVieweyePosition - Position of the eye.public void setHeading(Angle heading)
View
setHeading in interface ViewsetHeading in class BasicViewheading - The direction to aim the view in degreesprotected void setModelCoordinates(OrbitViewInputSupport.OrbitViewState modelCoords)
public void setOrbitViewLimits(OrbitViewLimits viewLimits)
OrbitViewLimits that will apply to this OrbitView. Incoming parameters to the
methods setCenterPosition, setHeading, setPitch, or setZoom will be limited by the parameters defined in
viewLimits.
setOrbitViewLimits in interface OrbitViewviewLimits - the OrbitViewLimits that will apply to this OrbitView.
java.lang.IllegalArgumentException - if viewLimits is null.
public void setOrientation(Position eyePosition,
Position centerPosition)
VieweyePosition,
and the center of the screen is the specified centerPositoin.
Specifically, implementations must determine what the up direction will be given
these parameters, and apply these parameters in a meaningful way.
setOrientation in interface ViewsetOrientation in class BasicVieweyePosition - Position of they eye.centerPosition - Position of the screen center.public void setPitch(Angle pitch)
View
setPitch in interface ViewsetPitch in class BasicViewpitch - The pitch of the view.public void setViewOutOfFocus(boolean b)
b - true if the point of rotation needs recalculation, false if it does not.public void setZoom(double zoom)
OrbitView
setZoom in interface OrbitViewpublic void stopMovementOnCenter()
OrbitView
stopMovementOnCenter in interface OrbitViewpublic Vec4 unProject(Vec4 windowPoint)
ViewPoint in screen coordinates to a Point in model coordinates. The input x and y
are relative to the lower left hand screen corner, while z is the screen depth-coordinate. If the screen point
cannot be sucessfully mapped, this will return null.
unProject in interface ViewunProject in class BasicViewwindowPoint - the window coordinate Point to project.
Point.protected boolean validateModelCoordinates(OrbitViewInputSupport.OrbitViewState modelCoords)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||