NASA World Wind

gov.nasa.worldwind.view
Class BasicViewPropertyLimits

java.lang.Object
  extended by gov.nasa.worldwind.view.BasicViewPropertyLimits
All Implemented Interfaces:
ViewPropertyLimits
Direct Known Subclasses:
BasicOrbitViewLimits, FlyViewLimits

public class BasicViewPropertyLimits
extends Object
implements ViewPropertyLimits


Field Summary
protected  Sector eyeLocationLimits
           
protected  double maxEyeElevation
           
protected  Angle maxHeading
           
protected  Angle maxPitch
           
protected  Angle maxRoll
           
protected  double minEyeElevation
           
protected  Angle minHeading
           
protected  Angle minPitch
           
protected  Angle minRoll
           
 
Constructor Summary
BasicViewPropertyLimits()
           
 
Method Summary
 double[] getEyeElevationLimits()
          Returns the minimum and maximum values for the View elevation.
 Sector getEyeLocationLimits()
          Returns the Sector which limits the View eye position latitude and longitude.
 Angle[] getHeadingLimits()
          Returns the minimum and maximum Angles for the OrbitView heading property.
 Angle[] getPitchLimits()
          Returns the minimum and maximum Angles for the OrbitView pitch property.
 void getRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
           
 Angle[] getRollLimits()
          Get the limits for roll.
static double limitEyeElevation(double elevation, ViewPropertyLimits viewLimits)
           
static LatLon limitEyePositionLocation(Angle latitude, Angle longitude, ViewPropertyLimits viewLimits)
           
static Angle limitHeading(Angle angle, ViewPropertyLimits viewLimits)
           
static Angle limitPitch(Angle angle, ViewPropertyLimits viewLimits)
           
static Angle limitRoll(Angle angle, ViewPropertyLimits viewLimits)
          Clamp a roll angle to the range specified in a limit object.
 void restoreState(RestorableSupport rs, RestorableSupport.StateObject context)
           
 void setEyeElevationLimits(double minValue, double maxValue)
          Sets the minimum and maximum values for the View elevation.
 void setEyeLocationLimits(Sector sector)
          Sets the Sector which will limit the View eye position latitude and longitude.
 void setHeadingLimits(Angle minAngle, Angle maxAngle)
          Sets the minimum and maximum Angles which will limit the OrbitView heading property.
 void setPitchLimits(Angle minAngle, Angle maxAngle)
          Sets the minimum and maximum Angles which will limit the OrbitView pitch property.
 void setRollLimits(Angle minAngle, Angle maxAngle)
          Set the roll limits.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eyeLocationLimits

protected Sector eyeLocationLimits

maxEyeElevation

protected double maxEyeElevation

maxHeading

protected Angle maxHeading

maxPitch

protected Angle maxPitch

maxRoll

protected Angle maxRoll

minEyeElevation

protected double minEyeElevation

minHeading

protected Angle minHeading

minPitch

protected Angle minPitch

minRoll

protected Angle minRoll
Constructor Detail

BasicViewPropertyLimits

public BasicViewPropertyLimits()
Method Detail

getEyeElevationLimits

public double[] getEyeElevationLimits()
Description copied from interface: ViewPropertyLimits
Returns the minimum and maximum values for the View elevation.

Specified by:
getEyeElevationLimits in interface ViewPropertyLimits
Returns:
minimum and maximum allowable values for the elevation.

getEyeLocationLimits

public Sector getEyeLocationLimits()
Description copied from interface: ViewPropertyLimits
Returns the Sector which limits the View eye position latitude and longitude.

Specified by:
getEyeLocationLimits in interface ViewPropertyLimits
Returns:
Sector which limits the eye position latitude and longitude.

getHeadingLimits

public Angle[] getHeadingLimits()
Description copied from interface: ViewPropertyLimits
Returns the minimum and maximum Angles for the OrbitView heading property.

Specified by:
getHeadingLimits in interface ViewPropertyLimits
Returns:
minimum and maximum allowable Angles for heading.

getPitchLimits

public Angle[] getPitchLimits()
Description copied from interface: ViewPropertyLimits
Returns the minimum and maximum Angles for the OrbitView pitch property.

Specified by:
getPitchLimits in interface ViewPropertyLimits
Returns:
minimum and maximum allowable Angles for pitch.

getRestorableState

public void getRestorableState(RestorableSupport rs,
                               RestorableSupport.StateObject context)
Specified by:
getRestorableState in interface ViewPropertyLimits

getRollLimits

public Angle[] getRollLimits()
Get the limits for roll.

Specified by:
getRollLimits in interface ViewPropertyLimits
Returns:
The roll limits as a two element array {minRoll, maxRoll},

limitEyeElevation

public static double limitEyeElevation(double elevation,
                                       ViewPropertyLimits viewLimits)

limitEyePositionLocation

public static LatLon limitEyePositionLocation(Angle latitude,
                                              Angle longitude,
                                              ViewPropertyLimits viewLimits)

limitHeading

public static Angle limitHeading(Angle angle,
                                 ViewPropertyLimits viewLimits)

limitPitch

public static Angle limitPitch(Angle angle,
                               ViewPropertyLimits viewLimits)

limitRoll

public static Angle limitRoll(Angle angle,
                              ViewPropertyLimits viewLimits)
Clamp a roll angle to the range specified in a limit object.

Parameters:
angle - Angle to clamp to the allowed range.
viewLimits - defines the roll limits.

restoreState

public void restoreState(RestorableSupport rs,
                         RestorableSupport.StateObject context)
Specified by:
restoreState in interface ViewPropertyLimits

setEyeElevationLimits

public void setEyeElevationLimits(double minValue,
                                  double maxValue)
Description copied from interface: ViewPropertyLimits
Sets the minimum and maximum values for the View elevation.

Specified by:
setEyeElevationLimits in interface ViewPropertyLimits
Parameters:
minValue - The minimum elevation.
maxValue - The maximum elevation.

setEyeLocationLimits

public void setEyeLocationLimits(Sector sector)
Description copied from interface: ViewPropertyLimits
Sets the Sector which will limit the View eye position latitude and longitude.

Specified by:
setEyeLocationLimits in interface ViewPropertyLimits
Parameters:
sector - Sector which will limit the eye position latitude and longitude.

setHeadingLimits

public void setHeadingLimits(Angle minAngle,
                             Angle maxAngle)
Description copied from interface: ViewPropertyLimits
Sets the minimum and maximum Angles which will limit the OrbitView heading property.

Specified by:
setHeadingLimits in interface ViewPropertyLimits
Parameters:
minAngle - the minimum allowable angle for heading.
maxAngle - the maximum allowable angle for heading.

setPitchLimits

public void setPitchLimits(Angle minAngle,
                           Angle maxAngle)
Description copied from interface: ViewPropertyLimits
Sets the minimum and maximum Angles which will limit the OrbitView pitch property.

Specified by:
setPitchLimits in interface ViewPropertyLimits
Parameters:
minAngle - the minimum allowable angle for pitch.
maxAngle - the maximum allowable angle for pitch.

setRollLimits

public void setRollLimits(Angle minAngle,
                          Angle maxAngle)
Set the roll limits.

Specified by:
setRollLimits in interface ViewPropertyLimits
Parameters:
minAngle - The smallest allowable roll.
maxAngle - The largest allowable roll.

NASA World Wind