Package gov.nasa.worldwind.view.orbit
Class BasicOrbitViewLimits
- java.lang.Object
-
- gov.nasa.worldwind.view.BasicViewPropertyLimits
-
- gov.nasa.worldwind.view.orbit.BasicOrbitViewLimits
-
- All Implemented Interfaces:
OrbitViewLimits
,ViewPropertyLimits
public class BasicOrbitViewLimits extends BasicViewPropertyLimits implements OrbitViewLimits
BasicOrbitViewLimits provides an implementation of OrbitViewLimits.
-
-
Field Summary
Fields Modifier and Type Field Description protected Sector
centerLocationLimits
protected double
maxCenterElevation
protected double
maxZoom
protected double
minCenterElevation
protected double
minZoom
-
Fields inherited from class gov.nasa.worldwind.view.BasicViewPropertyLimits
eyeLocationLimits, maxEyeElevation, maxHeading, maxPitch, maxRoll, minEyeElevation, minHeading, minPitch, minRoll
-
-
Constructor Summary
Constructors Constructor Description BasicOrbitViewLimits()
Creates a new BasicOrbitViewLimits with default limits.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getCenterElevationLimits()
Returns the minimum and maximum values for the orbit view center elevation.Sector
getCenterLocationLimits()
Returns the Sector which limits the orbit view center latitude and longitude.void
getRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
double[]
getZoomLimits()
Returns the minimum and maximum values for the orbit view zoom property.Position
limitCenterPosition(View view, Position position)
Returns a position clamped to the center location limits and center elevation limits specified by this limit object.double
limitZoom(View view, double value)
Returns a distance clamped to the zoom limits specified by this limit object.void
reset()
Resets all property limits to their default values.void
restoreState(RestorableSupport rs, RestorableSupport.StateObject context)
void
setCenterElevationLimits(double minValue, double maxValue)
Sets the minimum and maximum values which will limit the orbit view center elevation.void
setCenterLocationLimits(Sector sector)
Sets the Sector which will limit the orbit view center latitude and longitude.void
setZoomLimits(double minValue, double maxValue)
Sets the minimum and maximum values which will limit the orbit view zoom property.-
Methods inherited from class gov.nasa.worldwind.view.BasicViewPropertyLimits
getEyeElevationLimits, getEyeLocationLimits, getHeadingLimits, getPitchLimits, getRollLimits, is2DGlobe, isNonContinous2DGlobe, limitEyePosition, limitHeading, limitPitch, limitRoll, setEyeElevationLimits, setEyeLocationLimits, setHeadingLimits, setPitchLimits, setRollLimits
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.view.ViewPropertyLimits
getEyeElevationLimits, getEyeLocationLimits, getHeadingLimits, getPitchLimits, getRollLimits, limitEyePosition, limitHeading, limitPitch, limitRoll, setEyeElevationLimits, setEyeLocationLimits, setHeadingLimits, setPitchLimits, setRollLimits
-
-
-
-
Field Detail
-
centerLocationLimits
protected Sector centerLocationLimits
-
minCenterElevation
protected double minCenterElevation
-
maxCenterElevation
protected double maxCenterElevation
-
minZoom
protected double minZoom
-
maxZoom
protected double maxZoom
-
-
Method Detail
-
getCenterLocationLimits
public Sector getCenterLocationLimits()
Returns the Sector which limits the orbit view center latitude and longitude.- Specified by:
getCenterLocationLimits
in interfaceOrbitViewLimits
- Returns:
- Sector which limits the center latitude and longitude.
-
setCenterLocationLimits
public void setCenterLocationLimits(Sector sector)
Sets the Sector which will limit the orbit view center latitude and longitude.- Specified by:
setCenterLocationLimits
in interfaceOrbitViewLimits
- Parameters:
sector
- Sector which will limit the center latitude and longitude.
-
getCenterElevationLimits
public double[] getCenterElevationLimits()
Returns the minimum and maximum values for the orbit view center elevation.- Specified by:
getCenterElevationLimits
in interfaceOrbitViewLimits
- Returns:
- Minimum and maximum allowable values for center elevation.
-
setCenterElevationLimits
public void setCenterElevationLimits(double minValue, double maxValue)
Sets the minimum and maximum values which will limit the orbit view center elevation.- Specified by:
setCenterElevationLimits
in interfaceOrbitViewLimits
- Parameters:
minValue
- the minimum allowable value for center elevation.maxValue
- the maximum allowable value for center elevation.
-
getZoomLimits
public double[] getZoomLimits()
Returns the minimum and maximum values for the orbit view zoom property.- Specified by:
getZoomLimits
in interfaceOrbitViewLimits
- Returns:
- Minimum and maximum allowable values for zoom.
-
setZoomLimits
public void setZoomLimits(double minValue, double maxValue)
Sets the minimum and maximum values which will limit the orbit view zoom property.- Specified by:
setZoomLimits
in interfaceOrbitViewLimits
- Parameters:
minValue
- the mimimum allowable value for zoom.maxValue
- the maximum allowable value for zoom.
-
reset
public void reset()
Resets all property limits to their default values.- Specified by:
reset
in interfaceViewPropertyLimits
- Overrides:
reset
in classBasicViewPropertyLimits
-
limitCenterPosition
public Position limitCenterPosition(View view, Position position)
Returns a position clamped to the center location limits and center elevation limits specified by this limit object. This method does not modify the specified view's properties, but may use the view as a context for determining how to apply the limits.- Specified by:
limitCenterPosition
in interfaceOrbitViewLimits
- Parameters:
view
- the view associated with the center position and the property limits.position
- position to clamp to the allowed range.- Returns:
- The clamped position.
-
limitZoom
public double limitZoom(View view, double value)
Returns a distance clamped to the zoom limits specified by this limit object. This method does not modify the specified view's properties, but may use the view as a context for determining how to apply the limits.- Specified by:
limitZoom
in interfaceOrbitViewLimits
- Parameters:
view
- the view associated with the zoom distance and the property limits.value
- zoom distance to clamp to the allowed range.- Returns:
- The clamped value.
-
getRestorableState
public void getRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
- Specified by:
getRestorableState
in interfaceViewPropertyLimits
- Overrides:
getRestorableState
in classBasicViewPropertyLimits
-
restoreState
public void restoreState(RestorableSupport rs, RestorableSupport.StateObject context)
- Specified by:
restoreState
in interfaceViewPropertyLimits
- Overrides:
restoreState
in classBasicViewPropertyLimits
-
-