Inheritance diagram for Eaagles::Basic::Terrain:


Public Member Functions | |
| Terrain () | |
| const char * | getFilename () const |
| virtual bool | setFilename (const LcString *const msg) |
| const char * | getPathname () const |
| virtual bool | setPathname (const LcString *const msg) |
| LCreal | getMinElevation () const |
| LCreal | getMaxElevation () const |
| double | getLatitudeSW () const |
| double | getLongitudeSW () const |
| double | getLatitudeNE () const |
| double | getLongitudeNE () const |
| virtual bool | isDataLoaded () const=0 |
| virtual unsigned int | getElevations (LCreal *const elevations, bool *const validFlags, const unsigned int n, const double lat, const double lon, const LCreal direction, const LCreal maxRng, const bool interp=false) const=0 |
| virtual bool | getElevation (LCreal *const elev, const double lat, const double lon, const bool=false) const =0 |
| virtual bool | targetOcculting (const double refLat, const double refLon, const LCreal refAlt, const double tgtLat, const double tgtLon, const LCreal tgtAlt) const |
| virtual void | reset () |
Static Public Member Functions | |
| static bool | occultCheck (const LCreal *const elevations, const bool *const validFlags, const unsigned int n, const LCreal range, const LCreal refAlt, const LCreal tgtAlt) |
| static bool | vbwShadowChecker (bool *const maskFlags, const LCreal *const elevations, const bool *const validFlags, const unsigned int n, const LCreal range, const LCreal refAlt, const LCreal beamAngle=0, const LCreal beamWidth=180) |
| static bool | aac (LCreal *const aacData, const LCreal *const elevData, const bool *const maskFlags, const unsigned int n, const LCreal range, const LCreal refAlt) |
| static bool | cLight (LCreal *const ldata, const LCreal *const elevData, const bool *const maskFlags, const unsigned int n, const LCreal range, const osg::Vec2 &lv) |
| static bool | getElevationColor (const LCreal elevation, const LCreal minz, const LCreal maxz, const LcHsva **colorTable, const unsigned int numColors, osg::Vec3 &rgb) |
Protected Member Functions | |
| virtual void | clearData ()=0 |
| virtual bool | setMinElevation (const LCreal v) |
| virtual bool | setMaxElevation (const LCreal v) |
| virtual bool | setLatitudeSW (const double v) |
| virtual bool | setLongitudeSW (const double v) |
| virtual bool | setLatitudeNE (const double v) |
| virtual bool | setLongitudeNE (const double v) |
Private Member Functions | |
| virtual bool | loadData ()=0 |
Private Attributes | |
| const LcString * | path |
| const LcString * | file |
| double | neLat |
| double | neLon |
| double | swLat |
| double | swLon |
| LCreal | minElev |
| LCreal | maxElev |
Abstract class for managing the terrain elevation databases.
Database specific, derived classes will be used to handle the
various database formats (e.g., DTED, DED).
Slots:
file <String> Data file name
path <String> Data path name
Notes:
1) the first point [0] of all arrays is at the reference point
2) the final point [n-1] is at the maximum range
3) The size of all arrays, n, must contain at least 2 points (ref point & max range)
| Eaagles::Basic::Terrain::Terrain | ( | ) |
| const char * Eaagles::Basic::Terrain::getFilename | ( | ) | const |
Returns the name of the datafile.
| bool Eaagles::Basic::Terrain::setFilename | ( | const LcString *const | msg | ) | [virtual] |
Sets the name of the datafile.
| const char * Eaagles::Basic::Terrain::getPathname | ( | ) | const |
Returns the path to the datafiles.
| bool Eaagles::Basic::Terrain::setPathname | ( | const LcString *const | msg | ) | [virtual] |
Sets the path to the datafiles.
| LCreal Eaagles::Basic::Terrain::getMinElevation | ( | ) | const [inline] |
Minimum elevation in this database (meters).
| LCreal Eaagles::Basic::Terrain::getMaxElevation | ( | ) | const [inline] |
Maximum elevation in this database (meters).
| double Eaagles::Basic::Terrain::getLatitudeSW | ( | ) | const [inline] |
Southwest corner latitude of this database (degs).
| double Eaagles::Basic::Terrain::getLongitudeSW | ( | ) | const [inline] |
Southwest corner longitude of this database (degs).
| double Eaagles::Basic::Terrain::getLatitudeNE | ( | ) | const [inline] |
Northeast corner latitude of this database (degs).
| double Eaagles::Basic::Terrain::getLongitudeNE | ( | ) | const [inline] |
Northeast corner longitude of this database (degs).
| virtual bool Eaagles::Basic::Terrain::isDataLoaded | ( | ) | const [pure virtual] |
Has the data been loaded.
| virtual unsigned int Eaagles::Basic::Terrain::getElevations | ( | LCreal *const | elevations, | |
| bool *const | validFlags, | |||
| const unsigned int | n, | |||
| const double | lat, | |||
| const double | lon, | |||
| const LCreal | direction, | |||
| const LCreal | maxRng, | |||
| const bool | interp = false | |||
| ) | const [pure virtual] |
Locates an array of (at least two) elevation points (and sets valid flags if found) returns the number of points found within this DataFile elevations - The elevation array (meters) validFlags - Valid elevation flag array (true if elevation was found) n - Size of elevation and valdFlags arrays lat - Starting latitude (degs) lon - Starting longitude (degs) direction - True direction (heading) angle of the data (degs) maxRng - Range to last elevation point (meters) interp - Interpolate between elevation posts (default: false)
| virtual bool Eaagles::Basic::Terrain::getElevation | ( | LCreal *const | elev, | |
| const double | lat, | |||
| const double | lon, | |||
| const | bool = false | |||
| ) | const [pure virtual] |
Locates an elevation value (meters) for a given reference point and returns it in 'elev'. Function returns true if successfull, otherwise 'elev' is unchanged. elev - The elevation value (meters) lat - Reference latitude (degs) lon - Reference longitude (degs) interp - Interpolate between elevation posts (default: false)
| bool Eaagles::Basic::Terrain::targetOcculting | ( | const double | refLat, | |
| const double | refLon, | |||
| const LCreal | refAlt, | |||
| const double | tgtLat, | |||
| const double | tgtLon, | |||
| const LCreal | tgtAlt | |||
| ) | const [virtual] |
Returns true if a target point is occulted by the terrain as seen from the ref point refLat - Ref latitude (degs); refLon - Ref longitude (degs) refAlt - Ref altitude (meters); tgtLat - Target latitude (degs) tgtLon - Target longitde (degs); tgtAlt - Target altitude (meters)
| bool Eaagles::Basic::Terrain::occultCheck | ( | const LCreal *const | elevations, | |
| const bool *const | validFlags, | |||
| const unsigned int | n, | |||
| const LCreal | range, | |||
| const LCreal | refAlt, | |||
| const LCreal | tgtAlt | |||
| ) | [static] |
Returns true if a target altitude is occulted by the terrain as seen from the ref altitude elevations - The elevation array (meters) validFlags - (Optional) Valid elevation flag array (true if elevation was found) n - Size of elevation and valdFlags arrays range - Range (meters) refAlt - Ref altitude (meters) tgtAlt - Target altitude (meters)
| bool Eaagles::Basic::Terrain::vbwShadowChecker | ( | bool *const | maskFlags, | |
| const LCreal *const | elevations, | |||
| const bool *const | validFlags, | |||
| const unsigned int | n, | |||
| const LCreal | range, | |||
| const LCreal | refAlt, | |||
| const LCreal | beamAngle = 0, |
|||
| const LCreal | beamWidth = 180 | |||
| ) | [static] |
range - Range (meters) refAlt - Ref altitude (meters) beamAngle - (optional) Center beam elevation angle (degs) beamWidth - (optional) Total beam width angle (degs)
| bool Eaagles::Basic::Terrain::aac | ( | LCreal *const | aacData, | |
| const LCreal *const | elevData, | |||
| const bool *const | maskFlags, | |||
| const unsigned int | n, | |||
| const LCreal | range, | |||
| const LCreal | refAlt | |||
| ) | [static] |
aac() -- Compute Aspect Angle Cosines; computes the cosine of the angle inwhich the beam hits the terrain. aacData - The array for the aspect angle cosines elevData - The elevation array (meters) maskFlags - (Optional) The array of mask flags n - Size of the arrays range - Range (meters) refAlt - Ref altitude (meters)
| bool Eaagles::Basic::Terrain::cLight | ( | LCreal *const | ldata, | |
| const LCreal *const | elevData, | |||
| const bool *const | maskFlags, | |||
| const unsigned int | n, | |||
| const LCreal | range, | |||
| const osg::Vec2 & | lv | |||
| ) | [static] |
ldata - The array for the lighting factors elevData - The elevation array (meters) maskFlags - (Optional) The array of mask flags n - Size of the arrays; range - Range (meters); lv - Lighting vector
| bool Eaagles::Basic::Terrain::getElevationColor | ( | const LCreal | elevation, | |
| const LCreal | minz, | |||
| const LCreal | maxz, | |||
| const LcHsva ** | colorTable, | |||
| const unsigned int | numColors, | |||
| osg::Vec3 & | rgb | |||
| ) | [static] |
Converts an elevation to a color (or gray scale) gray scale (colorScale flag = false): black @ minz; white @ maxz;
color scale (colorScale flag = true): blue @ <= minz cyan @ 1/6 of maxz green @ 2/6 of maxz yellow @ 3/6 of maxz red @ 4/6 of maxz megenta @ 5/6 of maxz white @ >= maxz elevation - Elevation; minz - Min elevation (units: same as elevation) maxz - Max elevtion (units: same as elevation); colorTable - Color table numColors - Number of colors; rgb - Color
| void Eaagles::Basic::Terrain::reset | ( | ) | [virtual] |
| virtual void Eaagles::Basic::Terrain::clearData | ( | ) | [protected, pure virtual] |
Clear the data arrays.
| bool Eaagles::Basic::Terrain::setMinElevation | ( | const LCreal | v | ) | [protected, virtual] |
Minimum elevation in this database (meters).
| bool Eaagles::Basic::Terrain::setMaxElevation | ( | const LCreal | v | ) | [protected, virtual] |
Maximum elevation in this database (meters).
| bool Eaagles::Basic::Terrain::setLatitudeSW | ( | const double | v | ) | [protected, virtual] |
Southwest corner latitude of this database (degs: +/-90).
| bool Eaagles::Basic::Terrain::setLongitudeSW | ( | const double | v | ) | [protected, virtual] |
Southwest corner longitude of this database (degs: +/-180).
| bool Eaagles::Basic::Terrain::setLatitudeNE | ( | const double | v | ) | [protected, virtual] |
Northeast corner latitude of this database (degs: +/-90).
| bool Eaagles::Basic::Terrain::setLongitudeNE | ( | const double | v | ) | [protected, virtual] |
Northeast corner longitude of this database (degs: +/-180).
| virtual bool Eaagles::Basic::Terrain::loadData | ( | ) | [private, pure virtual] |
Load the data file.
const LcString* Eaagles::Basic::Terrain::path [private] |
Data path name.
const LcString* Eaagles::Basic::Terrain::file [private] |
Data file name.
double Eaagles::Basic::Terrain::neLat [private] |
Northeast lat/lon (degs).
double Eaagles::Basic::Terrain::neLon [private] |
double Eaagles::Basic::Terrain::swLat [private] |
Southwest lat/lon (degs).
double Eaagles::Basic::Terrain::swLon [private] |
LCreal Eaagles::Basic::Terrain::minElev [private] |
Minimum elevation (m).
LCreal Eaagles::Basic::Terrain::maxElev [private] |
Maximum elevation (m).
1.5.0