public class ViewControlsSelectListener extends Object implements SelectListener
ViewControlsLayer
.ViewControlsLayer
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_TIMER_DELAY |
protected double |
fovStep |
protected double |
headingStep |
protected Point |
lastPickPoint |
protected double |
panStep |
protected double |
pitchStep |
protected ScreenAnnotation |
pressedControl |
protected String |
pressedControlType |
protected Timer |
repeatTimer |
protected double |
veStep |
protected ViewControlsLayer |
viewControlsLayer |
protected WorldWindow |
wwd |
protected double |
zoomStep |
Constructor and Description |
---|
ViewControlsSelectListener(WorldWindow wwd,
ViewControlsLayer layer)
Construct a controller for specified
WorldWindow and ViewControlsLayer |
Modifier and Type | Method and Description |
---|---|
protected Angle |
computeLookHeading(OrbitView view,
ScreenAnnotation control,
double headingStep) |
protected Angle |
computeLookPitch(OrbitView view,
ScreenAnnotation control,
double pitchStep) |
protected double |
computeNewZoom(OrbitView view,
double amount) |
protected Angle |
computePanAmount(Globe globe,
OrbitView view,
ScreenAnnotation control,
double panStep) |
protected Angle |
computePanHeading(OrbitView view,
ScreenAnnotation control) |
protected Vec4 |
computeSurfacePoint(OrbitView view,
Angle heading,
Angle pitch)
Find out where on the terrain surface the eye would be looking at with the given heading and pitch angles.
|
double |
getFovIncrement()
Get the field of view increment factor.
|
double |
getHeadingIncrement()
Get the heading increment value in decimal degrees.
|
double |
getPanIncrement()
Get the panning distance factor.
|
protected Layer |
getParentLayer()
Returns this ViewControlsSelectListener's parent layer.
|
double |
getPitchIncrement()
Get the pitch increment value in decimal degrees.
|
int |
getRepeatTimerDelay()
Get the repeat timer delay in milliseconds.
|
double |
getVeIncrement()
Get the vertical exaggeration increment.
|
double |
getZoomIncrement()
Get the zooming distance factor.
|
protected boolean |
isPathCrossingAPole(LatLon p1,
LatLon p2) |
protected void |
resetOrbitView(OrbitView view)
Reset the view to an orbit view state if in first person mode (zoom = 0)
|
void |
selected(SelectEvent event) |
void |
setFovIncrement(double value)
Set the field of view increment factor.
|
void |
setHeadingIncrement(double value)
Set the heading increment value in decimal degrees.
|
void |
setPanIncrement(double value)
Set the panning distance factor.
|
void |
setPitchIncrement(double value)
Set the pitch increment value in decimal degrees.
|
void |
setRepeatTimerDelay(int delay)
Set the repeat timer delay in milliseconds.
|
protected void |
setupFirstPersonView(OrbitView view)
Setup the view to a first person mode (zoom = 0)
|
void |
setVeIncrement(double value)
Set the vertical exaggeration increment.
|
void |
setZoomIncrement(double value)
Set the zoom distance factor.
|
protected void |
updateView(ScreenAnnotation control,
String controlType) |
protected static final int DEFAULT_TIMER_DELAY
protected double fovStep
protected double headingStep
protected Point lastPickPoint
protected double panStep
protected double pitchStep
protected ScreenAnnotation pressedControl
protected String pressedControlType
protected Timer repeatTimer
protected double veStep
protected ViewControlsLayer viewControlsLayer
protected WorldWindow wwd
protected double zoomStep
public ViewControlsSelectListener(WorldWindow wwd, ViewControlsLayer layer)
WorldWindow
and ViewControlsLayer.
ViewControlLayer
s are not sharable among WorldWindow
s. A separate layer and controller
must be established for each window that's to have view controls.
wwd
- the WorldWindow
the specified layer is associated with.layer
- the layer to control.protected Angle computeLookHeading(OrbitView view, ScreenAnnotation control, double headingStep)
protected Angle computeLookPitch(OrbitView view, ScreenAnnotation control, double pitchStep)
protected double computeNewZoom(OrbitView view, double amount)
protected Angle computePanAmount(Globe globe, OrbitView view, ScreenAnnotation control, double panStep)
protected Angle computePanHeading(OrbitView view, ScreenAnnotation control)
protected Vec4 computeSurfacePoint(OrbitView view, Angle heading, Angle pitch)
view
- the orbit viewheading
- heading direction clockwise from north.pitch
- view pitch angle from the surface normal at the center point.public double getFovIncrement()
public double getHeadingIncrement()
public double getPanIncrement()
protected Layer getParentLayer()
public double getPitchIncrement()
public int getRepeatTimerDelay()
public double getVeIncrement()
public double getZoomIncrement()
protected void resetOrbitView(OrbitView view)
view
- the orbit view to resetpublic void selected(SelectEvent event)
selected
in interface SelectListener
public void setFovIncrement(double value)
value
- the field of view increment factor.IllegalArgumentException
public void setHeadingIncrement(double value)
value
- the heading increment value in decimal degrees.public void setPanIncrement(double value)
value
- the panning distance factor.public void setPitchIncrement(double value)
value
- the pitch increment value in decimal degrees.IllegalArgumentException
public void setRepeatTimerDelay(int delay)
delay
- the repeat timer delay in milliseconds.IllegalArgumentException
protected void setupFirstPersonView(OrbitView view)
view
- the orbit view to set into a first person view.public void setVeIncrement(double value)
value
- the vertical exaggeration increment.IllegalArgumentException
public void setZoomIncrement(double value)
value
- the zooming distance factor.protected void updateView(ScreenAnnotation control, String controlType)