|
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.AbstractView
gov.nasa.worldwind.view.BasicOrbitView
public class BasicOrbitView
Field Summary |
---|
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
changeSupport |
Fields inherited from interface gov.nasa.worldwind.view.OrbitView |
---|
CENTER_STOPPED |
Fields inherited from interface gov.nasa.worldwind.View |
---|
VIEW_STOPPED |
Constructor Summary | |
---|---|
BasicOrbitView()
|
|
BasicOrbitView(OrbitViewModel orbitViewModel)
|
Method Summary | |
---|---|
protected void |
afterDoApply()
|
boolean |
canFocusOnViewportCenter()
|
double |
computeHorizonDistance()
Gets the distance from the View's eye point to the horizon point on the last rendered
Globe . |
double |
computePixelSizeAtDistance(double distance)
Computes the screen-aligned dimension (in meters) that a screen pixel would cover at a given distance (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). |
protected void |
doApply(DrawContext dc)
|
void |
focusOnViewportCenter()
|
double |
getAutoFarClipDistance()
Returns the auto-configured far clipping plane distance, in eye coordinates. |
double |
getAutoNearClipDistance()
Returns the auto-configured near clipping plane distance, in eye coordinates. |
Position |
getCenterPosition()
|
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. |
Vec4 |
getEyePoint()
Returns the location of the eye in cartesian coordinates. |
Position |
getEyePosition()
Returns the location of the eye in geographic coordinates. |
double |
getFarClipDistance()
Returns the far clipping plane distance, in eye coordinates. |
Angle |
getFieldOfView()
Returns the horizontal field-of-view angle (the angle of visibility), or null if the implementation does not support a field-of-view. |
Vec4 |
getForwardVector()
Returns the forward axis in cartesian coordinates. |
Frustum |
getFrustum()
Returns the viewing Frustum in eye coordinates. |
Frustum |
getFrustumInModelCoordinates()
Returns the viewing Frustum in model coordinates. |
Angle |
getHeading()
|
Matrix |
getModelviewMatrix()
Returns the modelview matrix. |
double |
getNearClipDistance()
Returns the near clipping plane distance, in eye coordinates. |
OrbitViewModel |
getOrbitViewModel()
|
Angle |
getPitch()
|
Matrix |
getProjectionMatrix()
Gets the projection matrix. |
java.lang.String |
getRestorableState()
Returns an XML document string describing the object?s state. |
Vec4 |
getUpVector()
Returns the up axis in cartesian coordinates. |
java.awt.Rectangle |
getViewport()
Returns the bounds (x, y, width, height) of the viewport. |
double |
getZoom()
|
Vec4 |
project(Vec4 modelPoint)
Maps a Point in model (cartesian) coordinates to a Point in screen coordinates. |
void |
restoreState(java.lang.String stateInXml)
Restores the object?s state to what is described in the specified XML document string. |
void |
setCenterPosition(Position center)
|
void |
setEyePosition(Position eyePosition)
Sets the location of the eye in geographic coordinates. |
void |
setFarClipDistance(double distance)
Sets the far clipping plane distance, in eye coordinates. |
void |
setFieldOfView(Angle fieldOfView)
Sets the horiziontal field-of-view angle (the angle of visibillity) to the specified fieldOfView . |
void |
setHeading(Angle heading)
|
void |
setNearClipDistance(double distance)
Sets the near clipping plane distance, in eye coordinates. |
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)
|
void |
setZoom(double zoom)
|
void |
stopMovementOnCenter()
|
Vec4 |
unProject(Vec4 windowPoint)
Maps a Point in screen coordinates to a Point in model coordinates. |
Methods inherited from class gov.nasa.worldwind.view.AbstractView |
---|
apply, applyStateIterator, flagHadCollisions, hadCollisions, hasStateIterator, isDetectCollisions, popReferenceCenter, pushReferenceCenter, setDetectCollisions, stopMovement, stopStateIterators |
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 |
---|
apply, applyStateIterator, hadCollisions, hasStateIterator, isDetectCollisions, popReferenceCenter, pushReferenceCenter, setDetectCollisions, stopMovement, stopStateIterators |
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 |
Constructor Detail |
---|
public BasicOrbitView()
public BasicOrbitView(OrbitViewModel orbitViewModel)
Method Detail |
---|
protected void afterDoApply()
public boolean canFocusOnViewportCenter()
canFocusOnViewportCenter
in interface OrbitView
public double computeHorizonDistance()
View
View's
eye point to the horizon point on the last rendered
Globe
.
computeHorizonDistance
in interface View
public double computePixelSizeAtDistance(double distance)
View
computePixelSizeAtDistance
in interface View
distance
- the distance from the eye point, in eye coordinates, along the z-axis. This value must be
positive but is otherwise unbounded.
public Position computePositionFromScreenPoint(double x, double y)
View
SectorGeometry
, or the last analytical Globe
if no rendered geometry exists.
computePositionFromScreenPoint
in interface View
x
- 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)
View
View's
projection plane (or after projection into model space).
computeRayFromScreenPoint
in interface View
x
- 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.protected void doApply(DrawContext dc)
doApply
in class AbstractView
public void focusOnViewportCenter()
focusOnViewportCenter
in interface OrbitView
public double getAutoFarClipDistance()
View
getAutoFarClipDistance
in interface View
public double getAutoNearClipDistance()
View
getAutoNearClipDistance
in interface View
public Position getCenterPosition()
getCenterPosition
in interface OrbitView
public Vec4 getCurrentEyePoint()
View
View.getEyePosition()
and View.getEyePoint()
,
getCurrentEyePoint will return the View's immediate position.
getCurrentEyePoint
in interface View
public Position getCurrentEyePosition()
View
View.getEyePosition()
and View.getEyePoint()
,
getCurrentEyePosition will return the View's immediate position.
getCurrentEyePosition
in interface View
public Vec4 getEyePoint()
View
apply
.
getEyePoint
in interface View
public Position getEyePosition()
View
apply
.
getEyePosition
in interface View
public double getFarClipDistance()
View
View.getAutoFarClipDistance()
getFarClipDistance
in interface View
public Angle getFieldOfView()
View
getFieldOfView
in interface View
public Vec4 getForwardVector()
View
apply
.
getForwardVector
in interface View
public Frustum getFrustum()
View
Frustum
in eye coordinates. The Frustum
is the portion
of viewable space defined by three sets of parallel 'clipping' planes.
This value is computed in the most recent call to apply
.
getFrustum
in interface View
public Frustum getFrustumInModelCoordinates()
View
Frustum
in model coordinates. Model coordinate frustums are useful for
performing visibility tests against world geometry. This frustum has the same shape as the frustum returned
in getFrustum
, but it has been transformed into model space.
This value is computed in the most recent call to apply
.
getFrustumInModelCoordinates
in interface View
public Angle getHeading()
getHeading
in interface OrbitView
public Matrix getModelviewMatrix()
View
apply
.
getModelviewMatrix
in interface View
public double getNearClipDistance()
View
View.getAutoNearClipDistance()
.
getNearClipDistance
in interface View
public OrbitViewModel getOrbitViewModel()
getOrbitViewModel
in interface OrbitView
public Angle getPitch()
getPitch
in interface OrbitView
public Matrix getProjectionMatrix()
View
View
. The method View.getFrustum()
returns the geometry corresponding to this matrix.
This value is computed in the most recent call to apply
.
getProjectionMatrix
in interface View
public java.lang.String getRestorableState()
Restorable
restoreState
and passing the XML document.
getRestorableState
in interface Restorable
public Vec4 getUpVector()
View
apply
.
getUpVector
in interface View
public java.awt.Rectangle getViewport()
View
apply
.
getViewport
in interface View
public double getZoom()
getZoom
in interface OrbitView
public Vec4 project(Vec4 modelPoint)
View
Point
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 View
modelPoint
- the model coordinate Point
to project.
Point
.public void restoreState(java.lang.String stateInXml)
Restorable
restoreState
in interface Restorable
stateInXml
- an XML document string describing an object's state.public void setCenterPosition(Position center)
setCenterPosition
in interface OrbitView
public void setEyePosition(Position eyePosition)
View
eyePosition
.
setEyePosition
in interface View
eyePosition
- Position of the eye.public void setFarClipDistance(double distance)
View
setFarClipDistance
in interface View
distance
- the far clipping plane distance.public void setFieldOfView(Angle fieldOfView)
View
fieldOfView
.
This may be ignored if the implementation that do not support a field-of-view.
setFieldOfView
in interface View
fieldOfView
- the horizontal field-of-view angle.public void setHeading(Angle heading)
setHeading
in interface OrbitView
public void setNearClipDistance(double distance)
View
setNearClipDistance
in interface View
distance
- the near clipping plane distance.public void setOrientation(Position eyePosition, Position centerPosition)
View
eyePosition
,
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 View
eyePosition
- Position of they eye.centerPosition
- Position of the screen center.public void setPitch(Angle pitch)
setPitch
in interface OrbitView
public void setZoom(double zoom)
setZoom
in interface OrbitView
public void stopMovementOnCenter()
stopMovementOnCenter
in interface OrbitView
public Vec4 unProject(Vec4 windowPoint)
View
Point
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 View
windowPoint
- the window coordinate Point
to project.
Point
.
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |