public class BasicViewPropertyLimits extends Object implements ViewPropertyLimits
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
BasicViewPropertyLimits()
Creates a new BasicViewPropertyLimits with default limits.
|
Modifier and Type | Method and 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.
|
protected boolean |
is2DGlobe(Globe globe) |
protected boolean |
isNonContinous2DGlobe(Globe globe) |
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.
|
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
public BasicViewPropertyLimits()
public double[] getEyeElevationLimits()
getEyeElevationLimits
in interface ViewPropertyLimits
public Sector getEyeLocationLimits()
getEyeLocationLimits
in interface ViewPropertyLimits
public Angle[] getHeadingLimits()
getHeadingLimits
in interface ViewPropertyLimits
public Angle[] getPitchLimits()
getPitchLimits
in interface ViewPropertyLimits
public void getRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
getRestorableState
in interface ViewPropertyLimits
public Angle[] getRollLimits()
getRollLimits
in interface ViewPropertyLimits
protected boolean is2DGlobe(Globe globe)
protected boolean isNonContinous2DGlobe(Globe globe)
public Position limitEyePosition(View view, Position position)
limitEyePosition
in interface ViewPropertyLimits
view
- the view associated with the center position and the property limits.position
- position to clamp to the allowed range.public Angle limitHeading(View view, Angle angle)
limitHeading
in interface ViewPropertyLimits
view
- the view associated with the heading angle and the property limits.angle
- angle to clamp to the allowed range.public Angle limitPitch(View view, Angle angle)
limitPitch
in interface ViewPropertyLimits
view
- the view associated with the pitch angle and the property limits.angle
- angle to clamp to the allowed range.public Angle limitRoll(View view, Angle angle)
limitRoll
in interface ViewPropertyLimits
view
- the view associated with the roll angle and the property limits.angle
- angle to clamp to the allowed range.public void reset()
reset
in interface ViewPropertyLimits
public void restoreState(RestorableSupport rs, RestorableSupport.StateObject context)
restoreState
in interface ViewPropertyLimits
public void setEyeElevationLimits(double minValue, double maxValue)
setEyeElevationLimits
in interface ViewPropertyLimits
minValue
- the minimum elevation.maxValue
- the maximum elevation.public void setEyeLocationLimits(Sector sector)
setEyeLocationLimits
in interface ViewPropertyLimits
sector
- Sector which will limit the eye latitude and longitude.public void setHeadingLimits(Angle minAngle, Angle maxAngle)
setHeadingLimits
in interface ViewPropertyLimits
minAngle
- the minimum allowable angle for heading.maxAngle
- the maximum allowable angle for heading.public void setPitchLimits(Angle minAngle, Angle maxAngle)
setPitchLimits
in interface ViewPropertyLimits
minAngle
- the minimum allowable angle for pitch.maxAngle
- the maximum allowable angle for pitch.public void setRollLimits(Angle minAngle, Angle maxAngle)
setRollLimits
in interface ViewPropertyLimits
minAngle
- the minimum allowable angle for roll.maxAngle
- the maximum allowable angle for roll.