![]() |
VR-Forces 4.0.4 Class Documentation
|
This is the abstract base class for all terrain implementations. More...

Public Types | |
| typedef std::map< std::string, std::string > | TerrainSettings |
Public Member Functions | |
| DtTerrainImplementation (DtConsoleCommandManager *cmdManager) | |
| virtual | ~DtTerrainImplementation () |
| virtual bool | loadTerrain (const makArchives::DtGenericTerrainRecord &rec, const TerrainSettings &settings=TerrainSettings())=0 |
| Loads a terrain given the terrain record and a key/value pair of settings. | |
| virtual const Coordinate_System * | coordinateSystem () const =0 |
| virtual bool | chordIntersect (const DtChord &chord, DtChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const =0 |
| 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 =0 |
| 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 =0 |
| Returns intersection of a sphere with the terrain. | |
| virtual bool | intersectVectorNetwork (const DtChord &chord, DtVectorNetworkRecord *vectorRecord, DtVectorNetworkIntersectionRecord *vectorIntersectionRecord) const =0 |
| 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 DtVectorNetwork * | vectorNetwork () const =0 |
| virtual void | preloadTerrainAreas (const DtTerrainPagingGeometryList &preloadGeometry) |
| Specifies a list of terrain areas that should be preloaded by the terrain implementation, in the case of a paging or streaming terrain source. | |
| virtual const DtTerrainCapabilities * | terrainCapabilities () const =0 |
| virtual void | setIntersectDataLoadExpireTime (const double &expireTime) |
| No-op. | |
| virtual void | expireDataLoadRequestsBeforeTime (const double ¤tTime) |
| No-op. | |
| virtual void | processTrianglesInArea (DtTriangleCallbackFcn func, DtTriangleCallbackFinalizeFcn finalize, DtTerrainProcessPolygonsBox &box, void *usr) const |
| virtual void | setAssertOnBlockingTerrainCalls (bool assertBlock) |
| Determines if an exception should be thrown if a blocking terrain call is made. | |
| virtual bool | assertOnBlockingTerrainCalls () const |
| Determines if an exception should be thrown if a blocking terrain call is made. | |
Protected Attributes | |
| bool | myAssertOnBlockingTerrainCalls |
| Determines if an exception should be thrown if a blocking terrain call is made. | |
| TerrainSettings | mySettings |
| Settings used for this implementation. | |
Private Member Functions | |
| DtTerrainImplementation () | |
| Not implemented. | |
| DtTerrainImplementation (const DtTerrainImplementation &orig) | |
| Not implemented. | |
| DtTerrainImplementation & | operator= (const DtTerrainImplementation &orig) |
| Not implemented. | |
This is the abstract base class for all terrain implementations.
A terrain implementation is used by the DtTerrainInterface to interact with a terrain representation.
| typedef std::map<std::string, std::string> DtTerrainImplementation::TerrainSettings |
| DtTerrainImplementation::DtTerrainImplementation | ( | ) | [private] |
Not implemented.
| DtTerrainImplementation::DtTerrainImplementation | ( | const DtTerrainImplementation & | orig | ) | [private] |
Not implemented.
| virtual DtTerrainImplementation::~DtTerrainImplementation | ( | ) | [virtual] |
| DtTerrainImplementation& DtTerrainImplementation::operator= | ( | const DtTerrainImplementation & | orig | ) | [private] |
Not implemented.
| virtual bool DtTerrainImplementation::loadTerrain | ( | const makArchives::DtGenericTerrainRecord & | rec, |
| const TerrainSettings & | settings = TerrainSettings() |
||
| ) | [pure virtual] |
Loads a terrain given the terrain record and a key/value pair of settings.
These settings are interpreted (or not) by the implementation
Implemented in DtOsgEarthTerrainImplementation, DtVantageTerrainImplementation, DtGdbTerrainImplementation, DtTerrainPassThroughLayer, DtExtentTerrainImplementation, and DtEllipsoidTerrainImplementation.
| virtual const Coordinate_System* DtTerrainImplementation::coordinateSystem | ( | ) | const [pure virtual] |
| virtual bool DtTerrainImplementation::chordIntersect | ( | const DtChord & | chord, |
| DtChordIntersectionRecord & | record, | ||
| DtIntersectionRecord::DtIntersectionType | irtFlag = DtIntersectionRecord::INT_ALL_DATA, |
||
| bool * | dataAvailable = 0, |
||
| bool | overrideBlockingAssert = false |
||
| ) | const [pure 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. |
Implemented in DtOsgEarthTerrainImplementation, DtVantageTerrainImplementation, DtGdbTerrainImplementation, DtTerrainPassThroughLayer, DtExtentTerrainImplementation, DtEllipsoidTerrainImplementation, and DtIntersectTimerPassThroughLayer.
| virtual bool DtTerrainImplementation::allIntersectsAlongChord | ( | const DtChord & | chord, |
| DtChordIntersectRecordList & | intList, | ||
| DtIntersectionRecord::DtIntersectionType | irtFlag = DtIntersectionRecord::INT_ALL_DATA, |
||
| bool * | dataAvailable = 0, |
||
| bool | overrideBlockingAssert = false |
||
| ) | const [pure 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. |
Implemented in DtOsgEarthTerrainImplementation, DtVantageTerrainImplementation, DtTerrainPassThroughLayer, DtGdbTerrainImplementation, DtExtentTerrainImplementation, DtEllipsoidTerrainImplementation, and DtIntersectTimerPassThroughLayer.
| virtual bool DtTerrainImplementation::sphereIntersect | ( | const DtSphere & | sphere, |
| DtSphereIntersectionRecord & | record, | ||
| DtIntersectionRecord::DtIntersectionType | irtFlag = DtIntersectionRecord::INT_ALL_DATA, |
||
| bool * | dataAvailable = 0, |
||
| bool | overrideBlockingAssert = false |
||
| ) | const [pure 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. |
Implemented in DtOsgEarthTerrainImplementation, DtVantageTerrainImplementation, DtTerrainPassThroughLayer, DtGdbTerrainImplementation, DtExtentTerrainImplementation, and DtEllipsoidTerrainImplementation.
| virtual bool DtTerrainImplementation::intersectVectorNetwork | ( | const DtChord & | chord, |
| DtVectorNetworkRecord * | vectorRecord, | ||
| DtVectorNetworkIntersectionRecord * | vectorIntersectionRecord | ||
| ) | const [pure 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.
Implemented in DtOsgEarthTerrainImplementation, DtTerrainPassThroughLayer, DtExtentTerrainImplementation, DtGdbTerrainImplementation, DtVantageTerrainImplementation, and DtEllipsoidTerrainImplementation.
| virtual const DtVectorNetwork* DtTerrainImplementation::vectorNetwork | ( | ) | const [pure virtual] |
| virtual void DtTerrainImplementation::preloadTerrainAreas | ( | const DtTerrainPagingGeometryList & | preloadGeometry | ) | [inline, virtual] |
Specifies a list of terrain areas that should be preloaded by the terrain implementation, in the case of a paging or streaming terrain source.
The typical use of this is to specify parts of the terrain that are expected to be needed in the near future.
The terrain may not be loaded immediately upon making this call, and there is no guarantee that the terrain areas will be available for intersection immediately after making this call.
| preloadGeometry | A list of the geometric areas that should be preloaded. They can be specified using any of the subclasses of DtTerrainPagingGeometry. |
Reimplemented in DtVantageTerrainImplementation, and DtTerrainPassThroughLayer.
| virtual const DtTerrainCapabilities* DtTerrainImplementation::terrainCapabilities | ( | ) | const [pure virtual] |
Implemented in DtOsgEarthTerrainImplementation, DtTerrainPassThroughLayer, DtVantageTerrainImplementation, DtExtentTerrainImplementation, DtGdbTerrainImplementation, and DtEllipsoidTerrainImplementation.
| virtual void DtTerrainImplementation::setAssertOnBlockingTerrainCalls | ( | bool | assertBlock | ) | [virtual] |
Determines if an exception should be thrown if a blocking terrain call is made.
This can help to track down blocking terrain calls which are causing problems with a running simulation. Note that calling the blocking form of any terrain intersection function will cause an assertion; it is not necessary for the call to actually block and even non-paging implementations will assert. This is done to make it easier to find potential problems regardless of the particular terrain or location being used.
| virtual bool DtTerrainImplementation::assertOnBlockingTerrainCalls | ( | ) | const [virtual] |
Determines if an exception should be thrown if a blocking terrain call is made.
This can help to track down blocking terrain calls which are causing problems with a running simulation. Note that calling the blocking form of any terrain intersection function will cause an assertion; it is not necessary for the call to actually block and even non-paging implementations will assert. This is done to make it easier to find potential problems regardless of the particular terrain or location being used.
| virtual void DtTerrainImplementation::setIntersectDataLoadExpireTime | ( | const double & | expireTime | ) | [inline, virtual] |
No-op.
Override to set the default expiration time for data load requests generated by intersect calls that require data that has not yet been loaded (paged-in).
| expireTime | The expiration time to be assigned to load data requests generated by intersect calls on the terrain implementation. |
Reimplemented in DtVantageTerrainImplementation, and DtTerrainPassThroughLayer.
| virtual void DtTerrainImplementation::expireDataLoadRequestsBeforeTime | ( | const double & | currentTime | ) | [inline, virtual] |
No-op.
Override to expire data load requests generated before the given time. See comment for #setIntersectLoadDataExpireTime.
| currentTime | The time to compare to data load requests to determine if they should be expired rather than executed. |
Reimplemented in DtVantageTerrainImplementation, and DtTerrainPassThroughLayer.
| virtual void DtTerrainImplementation::processTrianglesInArea | ( | DtTriangleCallbackFcn | func, |
| DtTriangleCallbackFinalizeFcn | finalize, | ||
| DtTerrainProcessPolygonsBox & | box, | ||
| void * | usr | ||
| ) | const [virtual] |
Reimplemented in DtVantageTerrainImplementation, and DtGdbTerrainImplementation.
Determines if an exception should be thrown if a blocking terrain call is made.
This can help to track down blocking terrain calls which are causing problems with a running simulation.
TerrainSettings DtTerrainImplementation::mySettings [protected] |
Settings used for this implementation.