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

Public Types | |
| typedef boost::function< void(const makVrv::DtDynamicTerrainFeature &)> | DtDynamicTerrainQueryCallback |
Public Member Functions | |
| DtTerrainImplementation (DtConsoleCommandManager *cmdManager) | |
| virtual | ~DtTerrainImplementation () |
| virtual MAKVRinTerra::DtFeatureDatabase & | featureDatabase () |
| Access feature database. More... | |
| virtual const MAKVRinTerra::DtFeatureDatabase & | featureDatabase () const |
| virtual MAKVRinTerra::DtFeatureContext & | featureContext () |
| Access feature context. More... | |
| virtual const MAKVRinTerra::DtFeatureContext & | featureContext () const |
| virtual void | init () |
| Called immediately after creation. More... | |
| virtual void | finishedLoading (const MAKVRinTerra::DtProj &proj) |
| Called after terrain loaded successfully. More... | |
| virtual bool | loadTerrain (const makArchives::DtGenericTerrainRecord &rec)=0 |
| Loads a terrain given the terrain record. More... | |
| virtual void | clearCache () |
| Tells the terrain implementation (if it cares) to clear any terrain cache it hold. More... | |
| virtual void | shutdown (bool block=true) |
| Shutdown the terrain. More... | |
| virtual const Coordinate_System * | coordinateSystem () const =0 |
| virtual double | modelHeightDifferencesFromAppearances (int oldApp, int newApp) const |
| If supported by the implementation, return the height difference from the currently loaded model as a transition from the old appearance to the new appearance. More... | |
| virtual bool | createFromExtent (const Dt3dBoundingVolume &) |
| Creates an extent from the given extent. Not all implementations will support this. More... | |
| virtual bool | loadModel (const DtFilename &, const DtEntityType &t=DtEntityType()) |
| Defaults to loading terrain for gdb. More... | |
| virtual DtTerrainInterfaceConfig & | configurationOptions () |
| virtual const DtTerrainInterfaceConfig & | configurationOptions () const |
| virtual bool | chordIntersect (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const =0 |
| Returns topmost intersection of chord with terrain in record. More... | |
| virtual bool | allIntersectsAlongChord (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const =0 |
| Returns all intersections of chord with terrain. More... | |
| 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. More... | |
| virtual bool | dataAvailable (const DtTerrainPagingGeometryList &geometry, DtTerrainIntersectOptions::Fidelity=DtTerrainIntersectOptions::MAX_FIDELITY) |
| Returns true if all of the terrain which intersects the geometry list is paged in. More... | |
| virtual const DtTerrainCapabilities * | terrainCapabilities () const =0 |
| virtual void | setIntersectDataLoadExpireTime (const double &expireTime) |
| No-op. More... | |
| virtual void | expireDataLoadRequestsBeforeTime (const double ¤tTime) |
| No-op. More... | |
| virtual void | processTrianglesInArea (DtTriangleOutputInterface &, const DtTerrainProcessPolygonsBox &) const =0 |
| virtual DtTerrainInformation * | terrainInformation () |
| Return the terrain information pointer of the terrain implementation (null if none exist) this is a debug/optional function call (return null if not implemented) More... | |
| virtual void | breakUpChords (const MAKVRinTerra::DtProj &, const DtChord &chord, std::vector< DtChord > &chords) |
| virtual bool | hasFeatureContext () const |
| Returns true if there is an active feature context. More... | |
| virtual DtTerrainGeometryHandle * | createEntityGeometry (const DtFilename &file) |
| Create geometry in the terrain which represents the entity. More... | |
| virtual DtTerrainGeometryHandle * | createEntityGeometry (const DtEntityType &file) |
| Create geometry in the terrain which represents the entity by the given type, looking up visuals. More... | |
| virtual void | loadVisuals (const DtScenarioExplorer &) |
| Tells the terrain implementation (if it cares) to load visuals to support terrain/model usage. More... | |
| virtual DtDynamicTerrainRequestHandle | addDynamicTerrainChangeRequest (double time, makVrv::DtDynamicTerrainChange *command) |
| Add a dynamic terrain change request to the system. More... | |
| virtual DtDynamicTerrainQueryHandle | queryDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false) |
| Install a query which will call the supplied callback on matching dynamic terrain features as they are paged in. More... | |
| virtual void | queryCurrentDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false) |
| virtual void | cacheTerrainArea (int requestId, unsigned minLOD, unsigned maxLOD, const DtExtent &cacheArea, DtCacheProgressCallbackFunction fcn=0, void *usr=0) |
| Call this to start the process of caching terain data (if supported for the open terrain) using the given request id and extent. More... | |
| virtual void | cancelCacheTerrainArea (int requestId) |
| Call this routine to cancel a potential cache in progress. More... | |
| virtual void | writeTerrainIndex (const DtString &name) |
| Write terrain index. More... | |
| virtual void | addTerrainChangeNotificationCallback (DtTerrainChangeNotificationCallbackFcn fcn, void *user) |
| Adds a terrain change notification callback. More... | |
| virtual void | removeTerrainChangeNotificationCallback (DtTerrainChangeNotificationCallbackFcn fcn, void *user) |
| Removes terrain change notification callback. More... | |
| virtual void | invokeTerrainChangeNotificationCallBacks () |
| Invokes terrain change notification callbacks. More... | |
| virtual void | setAssertOnBlockingTerrainCalls (bool assertBlock) |
| Determines if an exception should be thrown if a blocking terrain call is made. More... | |
| virtual bool | assertOnBlockingTerrainCalls () const |
| virtual void | setWarnOnBlockingTerrainCalls (bool warnBlock) |
| Determines if a warning should be printed out if a blocking terrain call is made. More... | |
| virtual bool | warnOnBlockingTerrainCalls () const |
Protected Attributes | |
| DtTerrainInterfaceConfig | myConfig |
| bool | myAssertOnBlockingTerrainCalls |
| Determines if an exception should be thrown if a blocking terrain call is made. More... | |
| bool | myWarnOnBlockingTerrainCalls |
| boost::scoped_ptr < MAKVRinTerra::DtFeatureDatabase > | myFeatureDatabase |
| boost::scoped_ptr < MAKVRinTerra::DtFeatureContext > | myFeatureContext |
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 boost::function<void (const makVrv::DtDynamicTerrainFeature&)> DtTerrainImplementation::DtDynamicTerrainQueryCallback |
| DtTerrainImplementation::DtTerrainImplementation | ( | DtConsoleCommandManager * | cmdManager | ) |
|
virtual |
|
virtual |
Access feature database.
Reimplemented in DtTerrainPassThroughLayer.
|
virtual |
Reimplemented in DtTerrainPassThroughLayer.
|
virtual |
Access feature context.
Reimplemented in DtTerrainPassThroughLayer.
|
virtual |
Reimplemented in DtTerrainPassThroughLayer.
|
virtual |
Called immediately after creation.
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
Called after terrain loaded successfully.
| proj | DtProj object for local coordinate system. |
|
pure virtual |
Loads a terrain given the terrain record.
Implemented in DtVantageTerrainImplementation, DtTerrainPassThroughLayer, DtGdbTerrainImplementation, DtExtentTerrainImplementation, and DtEllipsoidTerrainImplementation.
|
virtual |
Tells the terrain implementation (if it cares) to clear any terrain cache it hold.
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
Shutdown the terrain.
Reimplemented in DtVantageTerrainImplementation, and DtTerrainPassThroughLayer.
|
pure virtual |
|
virtual |
If supported by the implementation, return the height difference from the currently loaded model as a transition from the old appearance to the new appearance.
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
Creates an extent from the given extent. Not all implementations will support this.
Reimplemented in DtGdbTerrainImplementation.
|
virtual |
Defaults to loading terrain for gdb.
Supply option entity for for use by implementation to mutate loaded model based on appearance
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
|
virtual |
|
pure virtual |
Returns topmost intersection of chord with terrain in record.
| Input | |
| chord | the chord to test |
| options | See DtTerrainIntersectOptions |
| Output | |
| record | the results of the intersection |
| status | See DtTerrainIntersectStatus |
Implemented in DtVantageTerrainImplementation, DtIntersectRecordPassThroughLayer, DtTerrainPassThroughLayer, DtGdbTerrainImplementation, DtExtentTerrainImplementation, DtEllipsoidTerrainImplementation, and DtIntersectTimerPassThroughLayer.
|
pure virtual |
Returns all intersections of chord with terrain.
| Input | |
| chord | the chord to test |
| options | See DtTerrainIntersectOptions |
| Output | |
| intList | the results of the intersection |
| status | See DtTerrainIntersectStatus |
Implemented in DtVantageTerrainImplementation, DtIntersectRecordPassThroughLayer, DtTerrainPassThroughLayer, DtGdbTerrainImplementation, DtExtentTerrainImplementation, DtEllipsoidTerrainImplementation, and DtIntersectTimerPassThroughLayer.
|
inlinevirtual |
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.
|
inlinevirtual |
Returns true if all of the terrain which intersects the geometry list is paged in.
Reimplemented in DtVantageTerrainImplementation.
|
pure virtual |
Implemented in DtVantageTerrainImplementation, DtTerrainPassThroughLayer, DtGdbTerrainImplementation, DtExtentTerrainImplementation, and DtEllipsoidTerrainImplementation.
|
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 |
|
virtual |
Determines if a warning should be printed out if a blocking terrain call is made.
|
virtual |
|
inlinevirtual |
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.
|
inlinevirtual |
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.
|
pure virtual |
|
inlinevirtual |
Return the terrain information pointer of the terrain implementation (null if none exist) this is a debug/optional function call (return null if not implemented)
Reimplemented in DtVantageTerrainImplementation, DtTerrainPassThroughLayer, DtGdbTerrainImplementation, and DtEllipsoidTerrainImplementation.
|
virtual |
|
virtual |
Returns true if there is an active feature context.
|
inlinevirtual |
Create geometry in the terrain which represents the entity.
Reimplemented in DtVantageTerrainImplementation.
|
inlinevirtual |
Create geometry in the terrain which represents the entity by the given type, looking up visuals.
Reimplemented in DtVantageTerrainImplementation.
|
inlinevirtual |
Tells the terrain implementation (if it cares) to load visuals to support terrain/model usage.
Reimplemented in DtVantageTerrainImplementation.
|
inlinevirtual |
Add a dynamic terrain change request to the system.
| time | Time at which this request takes place. |
| command | Command which describes this change. Takes ownership. |
| geometry | Only change features which match this geometry. Takes ownership. |
| Handle | object for removing this request. |
Reimplemented in DtVantageTerrainImplementation.
|
inlinevirtual |
Install a query which will call the supplied callback on matching dynamic terrain features as they are paged in.
Callbacks can then be installed on the feature itself to monitor it for changes and page out.
Reimplemented in DtVantageTerrainImplementation.
|
inlinevirtual |
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
Call this to start the process of caching terain data (if supported for the open terrain) using the given request id and extent.
Note that the extent coordinates are in lat/lon degrees (not radians). The callback is given to give progress on the load
Reimplemented in DtVantageTerrainImplementation, and DtTerrainPassThroughLayer.
|
virtual |
Call this routine to cancel a potential cache in progress.
Reimplemented in DtVantageTerrainImplementation, DtExtentTerrainImplementation, and DtTerrainPassThroughLayer.
|
virtual |
Write terrain index.
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
Adds a terrain change notification callback.
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
Removes terrain change notification callback.
Reimplemented in DtVantageTerrainImplementation.
|
virtual |
Invokes terrain change notification callbacks.
Reimplemented in DtVantageTerrainImplementation.
|
protected |
|
protected |
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.
|
protected |
|
protected |
|
protected |