public class TLcdDefaultVVGridLineOrdinateProvider extends Object
This class is a default implementation of ILcdVVGridLineOrdinateProvider
.
This grid-line ordinate provider uses a computed grid step to provide the ordinate information. This grid step is computed as follows:
Constructor and Description |
---|
TLcdDefaultVVGridLineOrdinateProvider()
Constructs a default grid-line ordinate provider.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getGridLineOrdinates(double aScale,
ILcdInterval aRange,
TLcdAltitudeUnit aUnit)
Returns an array of altitudes for which a grid-line is needed in the vertical view.
|
ILcdInterval |
getSnappedRange(double aScale,
ILcdInterval aRange,
TLcdAltitudeUnit aUnit)
Returns the range required by the vertical view to snap to its grid.
|
double[] |
getSubGridLineOrdinates(double aScale,
ILcdInterval aRange,
TLcdAltitudeUnit aUnit)
Returns an array of altitudes for which a sub grid-line is needed in the vertical view.
|
public TLcdDefaultVVGridLineOrdinateProvider()
public ILcdInterval getSnappedRange(double aScale, ILcdInterval aRange, TLcdAltitudeUnit aUnit)
Returns the range required by the vertical view to snap to its grid. This method is
used when the vertical view is configured to snap to its grid
.
Note that the method computes a grid step as described in the class documentation.
getSnappedRange
in interface ILcdVVGridLineOrdinateProvider
aScale
- The scale of the vertical view grid, defined in pixels per altitude unit.aRange
- The current range of the vertical view grid.aUnit
- The altitude unit in which the vertical view grid is defined.public double[] getGridLineOrdinates(double aScale, ILcdInterval aRange, TLcdAltitudeUnit aUnit)
Returns an array of altitudes for which a grid-line is needed in the vertical view.
Note that the method computes a grid step as described in the class documentation.
getGridLineOrdinates
in interface ILcdVVGridLineOrdinateProvider
aScale
- The scale of the vertical view grid, defined in pixels per altitude unit.aRange
- The current range of the vertical view grid.aUnit
- The altitude unit in which the vertical view grid is defined.public double[] getSubGridLineOrdinates(double aScale, ILcdInterval aRange, TLcdAltitudeUnit aUnit)
Returns an array of altitudes for which a sub grid-line is needed in the vertical view.
Note that the method computes a grid step as described in the class documentation.
getSubGridLineOrdinates
in interface ILcdVVGridLineOrdinateProvider
aScale
- The scale of the vertical view grid, defined in pixels per altitude unit.aRange
- The current range of the vertical view grid.aUnit
- The altitude unit in which the vertical view grid is defined.