![]() |
VR-Forces 4.0.4 Class Documentation
|
This terrain implementation reads in a .earth file to get elevation from an outside source. More...

Public Member Functions | |
| DtOsgEarthTerrainImplementation (DtConsoleCommandManager *) | |
| virtual | ~DtOsgEarthTerrainImplementation () |
| virtual bool | loadTerrain (const makArchives::DtGenericTerrainRecord &record, const TerrainSettings &settings=TerrainSettings()) |
| Loads a terrain given the terrain record and a key/value pair of settings. | |
| virtual const Coordinate_System * | coordinateSystem () const |
| virtual bool | chordIntersect (const DtChord &chord, DtChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Returns topmost intersection of chord with terrain in record. | |
| virtual bool | allIntersectsAlongChord (const DtChord &chord, DtChordIntersectRecordList &intList, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Returns all intersections of chord with terrain. | |
| virtual bool | sphereIntersect (const DtSphere &sphere, DtSphereIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Returns intersection of a sphere with the terrain. | |
| virtual bool | intersectVectorNetwork (const DtChord &chord, DtVectorNetworkRecord *vectorRecord, DtVectorNetworkIntersectionRecord *vectorIntersectionRecord) const |
| User passes in the chord to intersect the vector network and the vectorRecord defining the desired search parameters like the kind of features to be searched. | |
| virtual const DtTerrainCapabilities * | terrainCapabilities () const |
| virtual bool | chordIsVertical (const DtChord &chord) const |
| virtual const DtVectorNetwork * | vectorNetwork () const |
Static Public Member Functions | |
| static DtTerrainImplementation * | create (DtConsoleCommandManager *) |
Protected Attributes | |
| Coordinate_System * | myCoordinateSystem |
| osgEarth::Util::ElevationManager * | myElevationManager |
| Used to get just the highest possible LODs. | |
| DtVectorNetwork * | myVectorNetwork |
This terrain implementation reads in a .earth file to get elevation from an outside source.
Here is a sample .earth file:
<map name="srtm sample" type="globe">
<image name="pelican nasa blue marble" driver="tms"> <url>http://demo.pelicanmapping.com/rmweb/data/bluemarble-tms/tms.xml</url> </image>
<heightfield name="pelican srtm" driver="tms"> <url>http://demo.pelicanmapping.com/rmweb/data/srtm30_plus_tms/tms.xml</url> </heightfield>
<vertical_scale>2</vertical_scale> <skirt_ratio>0.01</skirt_ratio> <sample_ratio>0.25</sample_ratio>
<cache> <path>../../appData/cache</path> </cache>
</map>
| virtual DtOsgEarthTerrainImplementation::~DtOsgEarthTerrainImplementation | ( | ) | [virtual] |
| virtual bool DtOsgEarthTerrainImplementation::loadTerrain | ( | const makArchives::DtGenericTerrainRecord & | rec, |
| const TerrainSettings & | settings = TerrainSettings() |
||
| ) | [virtual] |
Loads a terrain given the terrain record and a key/value pair of settings.
These settings are interpreted (or not) by the implementation
Implements DtTerrainImplementation.
| virtual const Coordinate_System* DtOsgEarthTerrainImplementation::coordinateSystem | ( | ) | const [virtual] |
Implements DtTerrainImplementation.
| virtual bool DtOsgEarthTerrainImplementation::chordIntersect | ( | const DtChord & | chord, |
| DtChordIntersectionRecord & | record, | ||
| DtIntersectionRecord::DtIntersectionType | irtFlag = DtIntersectionRecord::INT_ALL_DATA, |
||
| bool * | dataAvailable = 0, |
||
| bool | overrideBlockingAssert = false |
||
| ) | const [virtual] |
Returns topmost intersection of chord with terrain in record.
| Input | |
| chord | the chord to test |
| irtFlag | specifies what intersection data should be filled in for the record. |
| Output | |
| record | the results of the intersection |
| dataAvailable | Please see "Synchronous and asynchronous calls with paged terrains" in DtTerrainInterface for information on how to specify that this function be blocking or non-blocking. If this parameter is specified and the required terrain data is not yet paged in, this call will return immediately and dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
Implements DtTerrainImplementation.
| virtual bool DtOsgEarthTerrainImplementation::allIntersectsAlongChord | ( | const DtChord & | chord, |
| DtChordIntersectRecordList & | intList, | ||
| DtIntersectionRecord::DtIntersectionType | irtFlag = DtIntersectionRecord::INT_ALL_DATA, |
||
| bool * | dataAvailable = 0, |
||
| bool | overrideBlockingAssert = false |
||
| ) | const [virtual] |
Returns all intersections of chord with terrain.
| Input | |
| chord | the chord to test |
| irtFlag | specifies what intersection data should be filled in for the record. |
| Output | |
| intList | the results of the intersection |
| dataAvailable | Please see "Synchronous and asynchronous calls with paged terrains" in DtTerrainInterface for information on how to specify that this function be blocking or non-blocking. If this parameter is specified and the required terrain data is not yet paged in, this call will return immediately and dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
Implements DtTerrainImplementation.
| virtual bool DtOsgEarthTerrainImplementation::sphereIntersect | ( | const DtSphere & | sphere, |
| DtSphereIntersectionRecord & | record, | ||
| DtIntersectionRecord::DtIntersectionType | irtFlag = DtIntersectionRecord::INT_ALL_DATA, |
||
| bool * | dataAvailable = 0, |
||
| bool | overrideBlockingAssert = false |
||
| ) | const [virtual] |
Returns intersection of a sphere with the terrain.
| Input | |
| sphere | the sphere to test |
| irtFlag | specifies what intersection data should be filled in for the record. |
| Output | |
| record | the results of the intersection |
| dataAvailable | Please see "Synchronous and asynchronous calls with paged terrains" in DtTerrainInterface for information on how to specify that this function be blocking or non-blocking. If this parameter is specified and the required terrain data is not yet paged in, this call will return immediately and dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
Implements DtTerrainImplementation.
| virtual bool DtOsgEarthTerrainImplementation::intersectVectorNetwork | ( | const DtChord & | chord, |
| DtVectorNetworkRecord * | vectorRecord, | ||
| DtVectorNetworkIntersectionRecord * | vectorIntersectionRecord | ||
| ) | const [virtual] |
User passes in the chord to intersect the vector network and the vectorRecord defining the desired search parameters like the kind of features to be searched.
Returns the best feature intersection and associated data in the vectorIntersectionRecord if there is an intersection. Returns false if there is no intersection.
Implements DtTerrainImplementation.
| virtual const DtTerrainCapabilities* DtOsgEarthTerrainImplementation::terrainCapabilities | ( | ) | const [inline, virtual] |
Implements DtTerrainImplementation.
| virtual bool DtOsgEarthTerrainImplementation::chordIsVertical | ( | const DtChord & | chord | ) | const [virtual] |
| virtual const DtVectorNetwork* DtOsgEarthTerrainImplementation::vectorNetwork | ( | ) | const [virtual] |
Implements DtTerrainImplementation.
| static DtTerrainImplementation* DtOsgEarthTerrainImplementation::create | ( | DtConsoleCommandManager * | ) | [static] |
osgEarth::Util::ElevationManager* DtOsgEarthTerrainImplementation::myElevationManager [protected] |
Used to get just the highest possible LODs.