GlsMap Toolkit
1.7.0
|
#include <gls_map_dted.h>
Public Member Functions | |
DTEDMapChartDataSource () | |
virtual | ~DTEDMapChartDataSource () |
virtual bool | GetAvailableCoverage (GeoRect *dest) DISTI_METHOD_OVERRIDE |
void | GetCellList (const GeoRect &coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList) DISTI_METHOD_OVERRIDE |
virtual bool | AreAllCellsLoaded (GlsMapView *view, GlsMapChart *chart) DISTI_METHOD_OVERRIDE |
void | AddDataFile (const std::string &filename) |
void | AddAllFiles (const std::string &directory, bool recurse) |
short | GetElevationDataPoint (double latDegs, double lonDegs) |
short | GetElevationDataPoint (GeoCoord coord) |
void | SetAircraftHeight (short aircraftHeight) |
void | SetDiffuseTerrainLayerEnabled (bool enabled) |
void | SetDiffuseTerrainLayerLightDirection (float x, float y, float z) |
void | SetDiffuseTerrainLayerTransparency (unsigned char alpha) |
void | SetTerrainLayerEnabled (bool enabled) |
void | SetTerrainLayerIntensityRange (unsigned char lowValue, unsigned char highValue) |
void | SetTerrainLayerElevationRange (short lowValue, short highValue) |
void | SetTerrainLayerTransparency (unsigned char alpha) |
void | SetTerrainLayerWaterEnabled (bool enabled) |
void | SetTerrainLayerWaterColor (const glsColor &waterColor) |
void | SetBandingLayerEnabled (bool enabled) |
void | SetBandingLayerBandCount (unsigned int numberOfBands) |
void | SetBandingLayerBandColor (unsigned int bandIndex, const glsColor &bandColor) |
void | SetBandingLayerBandDistance (unsigned int bandIndex, unsigned short bandDistance) |
void | SetContourLayerEnabled (bool enabled) |
void | SetContourLayerDrawPriority (bool drawOnTop) |
void | SetContourLayerInterval (unsigned short interval) |
void | SetContourLayerLineColor (const glsColor &lineColor) |
void | SetContourLayerLineThickness (unsigned char lineThickness) |
void | SetContourLayerHighQuality (bool highQuality) |
void | SetThreatLayerEnabled (bool enabled) |
void | SetThreatLayerBand (unsigned int bandIndex) |
void | SetThreatLayerThreatEnabled (unsigned int threatIndex, bool enabled) |
void | SetThreatLayerThreatLocation (unsigned int threatIndex, GeoCoord location) |
void | SetThreatLayerThreatRadius (unsigned int threatIndex, double sightRadius) |
void | SetThreatLayerThreatLethalityRadius (unsigned int threatIndex, double lethalityRadius) |
void | SetThreatLayerThreatDetectionRadius (unsigned int threatIndex, double detectionRadius) |
void | SetThreatLayerThreatHeight (unsigned int threatIndex, double height) |
void | SetThreatLayerColor (const glsColor &threatColor) |
void | SetThreatLayerAlgorithmRingEnabled (bool enabled) |
void | SetThreatLayerLethalityRingEnabled (bool enabled) |
void | SetThreatLayerDetectionRingEnabled (bool enabled) |
void | SetThreatLayerAlgorithmRingDashesEnabled (bool enabled) |
void | SetThreatLayerAlgorithmRingColor (glsColor &ringColor) |
void | SetThreatLayerLethalityRingColor (glsColor &ringColor) |
void | SetThreatLayerDetectionRingColor (glsColor &ringColor) |
void | SetThreatLayerAlgorithmRingThickness (unsigned char lineThickness) |
void | SetThreatLayerLethalityRingThickness (unsigned char lineThickness) |
void | SetThreatLayerDetectionRingThickness (unsigned char lineThickness) |
bool | HasWorkerThreadFinishedForArea (const GeoRect &rect) |
void | RemoveData (void) |
Public Member Functions inherited from disti::GlsMapChartDataSource | |
virtual | ~GlsMapChartDataSource () |
virtual unsigned long | GetBestLayer (GlsMapView *view, GlsMapChart *chart) const |
virtual void | PostDraw (GlsMapView *view, GlsMapChart *chart) |
Additional Inherited Members | |
Protected Member Functions inherited from disti::GlsMapChartDataSource | |
GlsMapChartDataSource () | |
Runtime implementation of a DTEDMapChartDataSource
DTEDMapChartDataSource::DTEDMapChartDataSource | ( | ) |
Constructor
|
virtual |
Destructor
void DTEDMapChartDataSource::AddAllFiles | ( | const std::string & | directory, |
bool | recurse | ||
) |
Reads in all compatble DTED files within the specified directory and adds their data to the data source.
directory | The path of the directory containing the files to be read in |
recurse | true if the file search should decend into child directories, false otherwise |
void DTEDMapChartDataSource::AddDataFile | ( | const std::string & | filename | ) |
Reads in a single DTED file and adds its data to the data source.
filename | The path and name of the file to be read in |
|
virtual |
Reimplemented from disti::GlsMapChartDataSource.
|
virtual |
Implements disti::GlsMapChartDataSource.
|
virtual |
Implements disti::GlsMapChartDataSource.
short DTEDMapChartDataSource::GetElevationDataPoint | ( | double | latDegs, |
double | lonDegs | ||
) |
Retrieves one data point from the currently loaded data. Performs interpolation if the requested location is between data points.
latDegs | The latitude of the height data point to retrieve, in degrees |
lonDegs | The longitude of the height data point to retrieve, in degrees |
short DTEDMapChartDataSource::GetElevationDataPoint | ( | GeoCoord | coord | ) |
Retrieves one data point from the currently loaded data. Performs interpolation if the requested location is between data points.
coord | The GeoCoord structure containing the location of the data point |
bool DTEDMapChartDataSource::HasWorkerThreadFinishedForArea | ( | const GeoRect & | rect | ) |
rect | The region that all cells that should be done with are in |
void DTEDMapChartDataSource::SetAircraftHeight | ( | short | aircraftHeight | ) |
Sets the current height of the aircraft for use in the elevation banding and threat region rendering. This value is measured in meters above sea level. Negative height values represent elevations below sea level.
aircraftHeight | The current height of the aircraft |
void DTEDMapChartDataSource::SetBandingLayerBandColor | ( | unsigned int | bandIndex, |
const glsColor & | bandColor | ||
) |
Sets the render color of one of the terrain elevation bands.
bandIndex | The zero-based index of the band to set the color of. Must be in the range 0 - 15. |
bandColor | The color to use when rendering the specified elevation band. |
void DTEDMapChartDataSource::SetBandingLayerBandCount | ( | unsigned int | numberOfBands | ) |
Sets the number of bands to use in the elevation banding rendering.
numberOfBands | The number of elevation bands. Must be in the range 1 - 16, inclusive. |
void DTEDMapChartDataSource::SetBandingLayerBandDistance | ( | unsigned int | bandIndex, |
unsigned short | bandDistance | ||
) |
Sets the 'distance' for one of the terrain elevation bands. This value represents the number of meters between the low and high boundaries for the elevation band. (Or, in the case of the top elevation band, the number of meters between the bottom of the band and the aircraft height.)
bandIndex | The zero-based index of the band to set the distance of. Must be in the range 0 - 15. |
bandDistance | The band's distance value, measured in meters. |
void DTEDMapChartDataSource::SetBandingLayerEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the Terrain Elevation Banding.
enabled | true if banding should be rendered, false if it should not |
void DTEDMapChartDataSource::SetContourLayerDrawPriority | ( | bool | drawOnTop | ) |
Sets the draw priority of the contour lines. If this value is set to true, the contour lines are drawn on top of all other map elements. If false, the contour lines are drawn on top of the terrain but underneath the elevation banding and threat regions.
drawOnTop | true to draw contour lines on top, false otherwise |
void DTEDMapChartDataSource::SetContourLayerEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the Terrain Contour Lines.
enabled | true if contour lines should be rendered, false if they should not |
void DTEDMapChartDataSource::SetContourLayerHighQuality | ( | bool | highQuality | ) |
Sets the 'quality' of the contour lines. If this value is false, contour lines are only drawn at elevation data point boundaries. If this value is true, bilinear interpolation is used to calculate contour lines within the elevation point boundaries.
highQuality | true to use interpolation for contour lines, false otherwise |
void DTEDMapChartDataSource::SetContourLayerInterval | ( | unsigned short | interval | ) |
Sets the elevation interval for the contour lines, in meters. A contour line is rendered wherever the terrain elevation crosses any integer multiple of this value.
interval | The interval distance, in meters. Must be at least 1. |
void DTEDMapChartDataSource::SetContourLayerLineColor | ( | const glsColor & | lineColor | ) |
Sets the render color for the contour lines.
lineColor | The color to use when rendering contour lines |
void DTEDMapChartDataSource::SetContourLayerLineThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the rendered contour lines, in pixels.
lineThickness | The contour line thickness in pixels |
void DTEDMapChartDataSource::SetDiffuseTerrainLayerEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the diffuse shaded terrain.
enabled | true if terrain should be rendered shaded, false if it should not |
void DTEDMapChartDataSource::SetDiffuseTerrainLayerLightDirection | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the direction of the light (not position) used in the diffuse terrain layer.
x | The X value of the direction vector. |
y | The Y value of the direction vector. |
z | The Z value of the direction vector. |
void DTEDMapChartDataSource::SetDiffuseTerrainLayerTransparency | ( | unsigned char | alpha | ) |
Sets the transparency for the diffuse terrain.
alpha | The terrain's alpha color component. 0-255 range. |
void DTEDMapChartDataSource::SetTerrainLayerElevationRange | ( | short | lowValue, |
short | highValue | ||
) |
Sets the elevation range for the terrain. Elevation values outside of this range are clamped to the nearest value within the range. Mapping of terrain elevation values to grayscale intensity values is performed using linear interpolation, with the low and high elevation values mapped to the low and high intensity values, respectively.
lowValue | The elevation lower limit value. |
highValue | The elevation upper limit value. Must be greater than or equal to the low value. |
void DTEDMapChartDataSource::SetTerrainLayerEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the height terrain.
enabled | true if terrain should be rendered, false if it should not |
void DTEDMapChartDataSource::SetTerrainLayerIntensityRange | ( | unsigned char | lowValue, |
unsigned char | highValue | ||
) |
Sets the intensity range for the terrain. The brightness of the terrain pixels will always be within this range. Mapping of terrain elevation values to grayscale intensity values is performed using linear interpolation, with the low and high elevation values mapped to the low and high intensity values, respectively.
lowValue | The lowest intensity value used to render the terrain. Must be at least 1. |
highValue | The highest intensity value used to render the terrain. Must be greater than or equal to the low value. |
void DTEDMapChartDataSource::SetTerrainLayerTransparency | ( | unsigned char | alpha | ) |
Sets the transparency for the height terrain.
alpha | The terrain's alpha color component. 0-255 range. |
void DTEDMapChartDataSource::SetTerrainLayerWaterColor | ( | const glsColor & | waterColor | ) |
Sets the color of the water for water rendering mode. If water rendering mode is enabled, all elevation values at or below sea level (elevation zero) are considered to be 'water' and are rendered using this color. This is set for both height and diffuse terrain.
waterColor | The color to use for rendering water |
void DTEDMapChartDataSource::SetTerrainLayerWaterEnabled | ( | bool | enabled | ) |
Enables or disables water rendering mode. If enabled, all elevation values at or below sea level (elevation zero) are considered to be 'water', and are rendered using the water color.
enabled | true if water mode should be enabled, false if disabled |
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingColor | ( | glsColor & | ringColor | ) |
Sets the render color of the 'Algorithm' threat ring.
ringColor | The color to use when rendering the threat ring |
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingDashesEnabled | ( | bool | enabled | ) |
Enables or disables rendering of dashes on the 'Algorithm' threat ring.
enabled | true to enable dashes, false to disable them |
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the 'Algorithm' threat ring.
enabled | true to enable the ring, false to disable it |
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the 'Algorithm' threat ring, in pixels.
lineThickness | The threat ring line thickness in pixels |
void DTEDMapChartDataSource::SetThreatLayerBand | ( | unsigned int | bandIndex | ) |
Sets the elevation band priority for the threat regions. This value indicates which terrain elevation bands that the threat regions should take render priority over. Any elevation bands with an index equal to or higher than this value are visually superseded by the presense of a threat region. For example, if this value is 2, then the first two elevation bands are always displayed, even within threatened regions, but the threat regions are displayed instead of the third (and subsequent) bands.
bandIndex | The index of the elevation band which the threat region should visually override. Must be in the range 0 - 15, inclusive. |
void DTEDMapChartDataSource::SetThreatLayerColor | ( | const glsColor & | threatColor | ) |
Sets the render color of the threat regions.
threatColor | The color to use when rendering the threat regions |
void DTEDMapChartDataSource::SetThreatLayerDetectionRingColor | ( | glsColor & | ringColor | ) |
Sets the render color of the 'Detection' threat ring.
ringColor | The color to use when rendering the threat ring |
void DTEDMapChartDataSource::SetThreatLayerDetectionRingEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the 'Detection' threat ring.
enabled | true to enable the ring, false to disable it |
void DTEDMapChartDataSource::SetThreatLayerDetectionRingThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the 'Detection' threat ring, in pixels.
lineThickness | The threat ring line thickness in pixels |
void DTEDMapChartDataSource::SetThreatLayerEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the Threat Intervisibility regions.
enabled | true if threat regions should be rendered, false if they should not |
void DTEDMapChartDataSource::SetThreatLayerLethalityRingColor | ( | glsColor & | ringColor | ) |
Sets the render color of the 'Lethality' threat ring.
ringColor | The color to use when rendering the threat ring |
void DTEDMapChartDataSource::SetThreatLayerLethalityRingEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the 'Lethality' threat ring.
enabled | true to enable the ring, false to disable it |
void DTEDMapChartDataSource::SetThreatLayerLethalityRingThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the 'Lethality' threat ring, in pixels.
lineThickness | The threat ring line thickness in pixels |
void DTEDMapChartDataSource::SetThreatLayerThreatDetectionRadius | ( | unsigned int | threatIndex, |
double | detectionRadius | ||
) |
Sets the radius of a threat's 'Detection' area. A circle of this radius is drawn centered on the threat's location.
threatIndex | The zero-based index of the threat to set the range of. Must be in the range 0 - 15, inclusive. |
detectionRadius | The radius of the detection circle, measured in meters. |
void DTEDMapChartDataSource::SetThreatLayerThreatEnabled | ( | unsigned int | threatIndex, |
bool | enabled | ||
) |
Enables or disables one of the threat sources for the threat region rendering. A disabled threat never generates any threat region.
threatIndex | The zero-based index of the threat to enable or disable. Must be in the range 0 - 15, inclusive. |
enabled | true to enable the threat, false to disable it |
void DTEDMapChartDataSource::SetThreatLayerThreatHeight | ( | unsigned int | threatIndex, |
double | height | ||
) |
Sets a threat's height. This value is added to the threat's altitude to determine it's elevation for the threat intervisibility calculation.
threatIndex | The zero-based index of the threat to set the height of. Must be in the range 0 - 15, inclusive. |
height | The height of the threat, in meters. |
void DTEDMapChartDataSource::SetThreatLayerThreatLethalityRadius | ( | unsigned int | threatIndex, |
double | lethalityRadius | ||
) |
Sets the radius of a threat's 'Lethality' area. A circle of this radius is drawn centered on the threat's location.
threatIndex | The zero-based index of the threat to set the range of. Must be in the range 0 - 15, inclusive. |
lethalityRadius | The radius of the lethality circle, measured in meters. |
void DTEDMapChartDataSource::SetThreatLayerThreatLocation | ( | unsigned int | threatIndex, |
GeoCoord | location | ||
) |
Sets the position of a threat source. The location structure contains the latitude (degrees), longitude (degrees), and altitude (meters) of the threat.
threatIndex | The zero-based index of the threat to set the location of. Must be in the range 0 - 15, inclusive. |
location | The structure containing the threat's new location. |
void DTEDMapChartDataSource::SetThreatLayerThreatRadius | ( | unsigned int | threatIndex, |
double | sightRadius | ||
) |
Sets the radius of a threat's 'Algorithm' area. Locations outside of this range are not considered in the line-of-sight calculations.
threatIndex | The zero-based index of the threat to set the range of. Must be in the range 0 - 15, inclusive. |
sightRadius | The distance at which this source can threaten, measured in meters. |