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 SectorcenterLocationLimitsprotected doublemaxCenterElevationprotected doublemaxZoomprotected doubleminCenterElevationprotected doubleminZoom-
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.SectorgetCenterLocationLimits()Returns the Sector which limits the orbit view center latitude and longitude.voidgetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)double[]getZoomLimits()Returns the minimum and maximum values for the orbit view zoom property.PositionlimitCenterPosition(View view, Position position)Returns a position clamped to the center location limits and center elevation limits specified by this limit object.doublelimitZoom(View view, double value)Returns a distance clamped to the zoom limits specified by this limit object.voidreset()Resets all property limits to their default values.voidrestoreState(RestorableSupport rs, RestorableSupport.StateObject context)voidsetCenterElevationLimits(double minValue, double maxValue)Sets the minimum and maximum values which will limit the orbit view center elevation.voidsetCenterLocationLimits(Sector sector)Sets the Sector which will limit the orbit view center latitude and longitude.voidsetZoomLimits(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:
getCenterLocationLimitsin 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:
setCenterLocationLimitsin 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:
getCenterElevationLimitsin 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:
setCenterElevationLimitsin 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:
getZoomLimitsin 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:
setZoomLimitsin 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:
resetin interfaceViewPropertyLimits- Overrides:
resetin 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:
limitCenterPositionin 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:
limitZoomin 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:
getRestorableStatein interfaceViewPropertyLimits- Overrides:
getRestorableStatein classBasicViewPropertyLimits
-
restoreState
public void restoreState(RestorableSupport rs, RestorableSupport.StateObject context)
- Specified by:
restoreStatein interfaceViewPropertyLimits- Overrides:
restoreStatein classBasicViewPropertyLimits
-
-