Package gov.nasa.worldwind.view
Interface ViewPropertyLimits
-
- All Known Subinterfaces:
OrbitViewLimits
- All Known Implementing Classes:
BasicOrbitViewLimits
,BasicViewPropertyLimits
,FlyViewLimits
public interface ViewPropertyLimits
ViewPropertyLimits defines a restriction on the viewing parameters of aView
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double[]
getEyeElevationLimits()
Returns the minimum and maximum values for a view's eye elevation.Sector
getEyeLocationLimits()
Returns the Sector which limits a view's eye latitude and longitude.Angle[]
getHeadingLimits()
Returns the minimum and maximum angles for a view's heading property.Angle[]
getPitchLimits()
Returns the minimum and maximum angles for a view's pitch property.void
getRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
Angle[]
getRollLimits()
Returns the minimum and maximum angles for a view's roll property.Position
limitEyePosition(View view, Position position)
Returns a position clamped to the eye location limits and the eye elevation limits specified by this limit object.Angle
limitHeading(View view, Angle angle)
Returns an angle clamped to the heading limits specified by this limit object.Angle
limitPitch(View view, Angle angle)
Returns an angle clamped to the pitch limits specified by this limit object.Angle
limitRoll(View view, Angle angle)
Returns an angle clamped to the roll limits specified by this limit object.void
reset()
Resets all property limits to their default values.void
restoreState(RestorableSupport rs, RestorableSupport.StateObject context)
void
setEyeElevationLimits(double minValue, double maxValue)
Sets the minimum and maximum values for a view's eye elevation.void
setEyeLocationLimits(Sector sector)
Sets the Sector which will limit a view's eye latitude and longitude.void
setHeadingLimits(Angle minAngle, Angle maxAngle)
Sets the minimum and maximum angles which will limit a view's heading property.void
setPitchLimits(Angle minAngle, Angle maxAngle)
Sets the minimum and maximum angles which will limit a view's pitch property.void
setRollLimits(Angle minAngle, Angle maxAngle)
Sets the minimum and maximum angles which will limit a view's roll property.
-
-
-
Method Detail
-
setEyeLocationLimits
void setEyeLocationLimits(Sector sector)
Sets the Sector which will limit a view's eye latitude and longitude.- Parameters:
sector
- Sector which will limit the eye latitude and longitude.- Throws:
java.lang.IllegalArgumentException
- if sector is null.
-
getEyeLocationLimits
Sector getEyeLocationLimits()
Returns the Sector which limits a view's eye latitude and longitude.- Returns:
- Sector which limits the eye latitude and longitude.
-
getEyeElevationLimits
double[] getEyeElevationLimits()
Returns the minimum and maximum values for a view's eye elevation.- Returns:
- Minimum and maximum allowable values for the elevation.
-
setEyeElevationLimits
void setEyeElevationLimits(double minValue, double maxValue)
Sets the minimum and maximum values for a view's eye elevation.- Parameters:
minValue
- the minimum elevation.maxValue
- the maximum elevation.
-
getHeadingLimits
Angle[] getHeadingLimits()
Returns the minimum and maximum angles for a view's heading property.- Returns:
- Minimum and maximum allowable angles for heading.
-
setHeadingLimits
void setHeadingLimits(Angle minAngle, Angle maxAngle)
Sets the minimum and maximum angles which will limit a view's heading property.- Parameters:
minAngle
- the minimum allowable angle for heading.maxAngle
- the maximum allowable angle for heading.- Throws:
java.lang.IllegalArgumentException
- if either minAngle or maxAngle is null.
-
getPitchLimits
Angle[] getPitchLimits()
Returns the minimum and maximum angles for a view's pitch property.- Returns:
- Minimum and maximum allowable angles for pitch.
-
setPitchLimits
void setPitchLimits(Angle minAngle, Angle maxAngle)
Sets the minimum and maximum angles which will limit a view's pitch property.- Parameters:
minAngle
- the minimum allowable angle for pitch.maxAngle
- the maximum allowable angle for pitch.- Throws:
java.lang.IllegalArgumentException
- if either minAngle or maxAngle is null.
-
getRollLimits
Angle[] getRollLimits()
Returns the minimum and maximum angles for a view's roll property.- Returns:
- Minimum and maximum allowable angles for roll.
-
setRollLimits
void setRollLimits(Angle minAngle, Angle maxAngle)
Sets the minimum and maximum angles which will limit a view's roll property.- Parameters:
minAngle
- the minimum allowable angle for roll.maxAngle
- the maximum allowable angle for roll.- Throws:
java.lang.IllegalArgumentException
- if either minAngle or maxAngle is null.
-
reset
void reset()
Resets all property limits to their default values.
-
limitEyePosition
Position limitEyePosition(View view, Position position)
Returns a position clamped to the eye location limits and the eye 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.- 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.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null.
-
limitHeading
Angle limitHeading(View view, Angle angle)
Returns an angle clamped to the heading 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.- Parameters:
view
- the view associated with the heading angle and the property limits.angle
- angle to clamp to the allowed range.- Returns:
- The clamped angle.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null.
-
limitPitch
Angle limitPitch(View view, Angle angle)
Returns an angle clamped to the pitch 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.- Parameters:
view
- the view associated with the pitch angle and the property limits.angle
- angle to clamp to the allowed range.- Returns:
- The clamped angle.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null.
-
limitRoll
Angle limitRoll(View view, Angle angle)
Returns an angle clamped to the roll 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.- Parameters:
view
- the view associated with the roll angle and the property limits.angle
- angle to clamp to the allowed range.- Returns:
- The clamped angle.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null.
-
getRestorableState
void getRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
-
restoreState
void restoreState(RestorableSupport rs, RestorableSupport.StateObject context)
-
-