GL Studio C++ Runtime API
|
#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) |
Public Member Functions inherited from GlsMapChartDataSource | |
virtual | ~GlsMapChartDataSource () |
Destructor for abstract base class. | |
virtual unsigned long | GetBestLayer (GlsMapView *view, GlsMapChart *chart) const |
virtual void | PostDraw (GlsMapView *view, GlsMapChart *chart) |
Additional Inherited Members | |
Protected Member Functions inherited from GlsMapChartDataSource | |
GlsMapChartDataSource () | |
Constructor for subclasses. | |
Runtime implementation of a DTEDMapChartDataSource
Constructor
|
virtual |
Destructor
void 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 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 GlsMapChartDataSource.
|
virtual |
Implements GlsMapChartDataSource.
|
virtual |
Implements GlsMapChartDataSource.
short 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 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 HasWorkerThreadFinishedForArea | ( | const GeoRect & | rect | ) |
rect | The region that all cells that should be done with are in |
void 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 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 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 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 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 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 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 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 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 SetContourLayerLineColor | ( | const glsColor & | lineColor | ) |
Sets the render color for the contour lines.
lineColor | The color to use when rendering contour lines |
void SetContourLayerLineThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the rendered contour lines, in pixels.
lineThickness | The contour line thickness in pixels |
void 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 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 SetDiffuseTerrainLayerTransparency | ( | unsigned char | alpha | ) |
Sets the transparency for the diffuse terrain.
alpha | The terrain's alpha color component. 0-255 range. |
void 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 SetTerrainLayerEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the height terrain.
enabled | true if terrain should be rendered, false if it should not |
void 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 SetTerrainLayerTransparency | ( | unsigned char | alpha | ) |
Sets the transparency for the height terrain.
alpha | The terrain's alpha color component. 0-255 range. |
void 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 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 SetThreatLayerAlgorithmRingColor | ( | glsColor & | ringColor | ) |
Sets the render color of the 'Algorithm' threat ring.
ringColor | The color to use when rendering the threat ring |
void SetThreatLayerAlgorithmRingDashesEnabled | ( | bool | enabled | ) |
Enables or disables rendering of dashes on the 'Algorithm' threat ring.
enabled | true to enable dashes, false to disable them |
void SetThreatLayerAlgorithmRingEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the 'Algorithm' threat ring.
enabled | true to enable the ring, false to disable it |
void SetThreatLayerAlgorithmRingThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the 'Algorithm' threat ring, in pixels.
lineThickness | The threat ring line thickness in pixels |
void 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 SetThreatLayerColor | ( | const glsColor & | threatColor | ) |
Sets the render color of the threat regions.
threatColor | The color to use when rendering the threat regions |
void SetThreatLayerDetectionRingColor | ( | glsColor & | ringColor | ) |
Sets the render color of the 'Detection' threat ring.
ringColor | The color to use when rendering the threat ring |
void SetThreatLayerDetectionRingEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the 'Detection' threat ring.
enabled | true to enable the ring, false to disable it |
void SetThreatLayerDetectionRingThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the 'Detection' threat ring, in pixels.
lineThickness | The threat ring line thickness in pixels |
void 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 SetThreatLayerLethalityRingColor | ( | glsColor & | ringColor | ) |
Sets the render color of the 'Lethality' threat ring.
ringColor | The color to use when rendering the threat ring |
void SetThreatLayerLethalityRingEnabled | ( | bool | enabled | ) |
Enables or disables rendering of the 'Lethality' threat ring.
enabled | true to enable the ring, false to disable it |
void SetThreatLayerLethalityRingThickness | ( | unsigned char | lineThickness | ) |
Sets the thickness of the 'Lethality' threat ring, in pixels.
lineThickness | The threat ring line thickness in pixels |
void 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 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 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 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 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 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. |