VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Attributes
DtTerrainPassThroughLayer Class Reference

This class is the base class for creating a "pass-though" layer in the terrain interface. A pass-though layer contains a real terrain implementation but it wraps all the functions in pass-though functions, which may perform operations in addition to the calls being made to the real terrain implementation. This may be used for logging intersections, gathering statistics, or doing performance analysis.

Inheritance diagram for DtTerrainPassThroughLayer:
Inheritance graph
[legend]

Classes

struct  DtCreatorParam
 

Public Member Functions

 DtTerrainPassThroughLayer (DtTerrainImplementation *terrainImplementation, DtConsoleCommandManager *cmdMgr)
 
virtual ~DtTerrainPassThroughLayer () override
 
virtual
MAKVRinTerra::DtFeatureDatabase
featureDatabase () override
 
virtual const
MAKVRinTerra::DtFeatureDatabase
featureDatabase () const override
 
virtual
MAKVRinTerra::DtFeatureContext
featureContext () override
 
virtual const
MAKVRinTerra::DtFeatureContext
featureContext () const override
 
virtual bool loadTerrain (const makArchives::DtGenericTerrainRecord &rec) override
 
virtual const Coordinate_SystemcoordinateSystem () const override
 
virtual void shutdown (bool block) override
 
virtual void preloadTerrainAreas (const DtTerrainPagingGeometryList &preloadGeometry) override
 
virtual bool chordIntersect (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const override
 
virtual bool allIntersectsAlongChord (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const override
 
virtual void cacheTerrainArea (int requestId, unsigned minLOD, unsigned maxLOD, const DtExtent &cacheArea, DtCacheProgressCallbackFunction fcn=0, void *usr=0) override
 
virtual void cancelCacheTerrainArea (int requestId) override
 
virtual const
DtTerrainCapabilities
terrainCapabilities () const override
 
virtual void setIntersectDataLoadExpireTime (const double &expireTime) override
 
virtual void expireDataLoadRequestsBeforeTime (const double &currentTime) override
 
virtual void processTrianglesInArea (DtTriangleOutputInterface &, const DtTerrainProcessPolygonsBox &box, DtTerrainCategoryMask terrainCategoryMask) const override
 
virtual DtTerrainInformationterrainInformation () override
 
- Public Member Functions inherited from DtTerrainImplementation
 DtTerrainImplementation (DtConsoleCommandManager *cmdManager)
 
virtual ~DtTerrainImplementation ()
 
virtual
MAKVRinTerra::DtAerodromeLoader
aerodromeLoader ()
 
virtual const
MAKVRinTerra::DtAerodromeLoader
aerodromeLoader () const
 
virtual void cacheAerodromes ()
 
virtual void init ()
 
virtual void finishedLoading (const MAKVRinTerra::DtProj &proj)
 
virtual void clearCache ()
 
virtual double modelHeightDifferencesFromAppearances (int oldApp, int newApp) const
 
virtual bool createFromExtent (const Dt3dBoundingVolume &)
 
virtual bool loadModel (const DtFilename &, const DtEntityType &t=DtEntityType())
 
virtual DtTerrainInterfaceConfigconfigurationOptions ()
 
virtual const
DtTerrainInterfaceConfig
configurationOptions () const
 
virtual bool dataAvailable (const DtTerrainPagingGeometryList &geometry, DtTerrainIntersectOptions::Fidelity=DtTerrainIntersectOptions::MAX_FIDELITY)
 
virtual void processTrianglesForGeometry (DtTriangleOutputInterface &, DtTerrainGeometryId) const
 
virtual void breakUpChords (const MAKVRinTerra::DtProj &, const DtChord &chord, std::vector< DtChord > &chords)
 
virtual bool hasFeatureContext () const
 
virtual DtTerrainGeometryHandlecreateEntityGeometry (const DtFilename &file)
 
virtual DtTerrainGeometryHandlecreateEntityGeometry (const DtEntityType &file)
 
virtual void loadVisuals (const DtScenarioExplorer &)
 
virtual
DtDynamicTerrainRequestHandle 
addDynamicTerrainChangeRequest (double time, makVrv::DtDynamicTerrainChange *command)
 
virtual DtDynamicTerrainQueryHandle queryDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false)
 
virtual void queryCurrentDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false)
 
virtual void writeTerrainIndex (const DtString &name)
 
virtual void addTerrainChangeNotificationCallback (DtTerrainChangeNotificationCallbackFcn fcn, void *user)
 
virtual void removeTerrainChangeNotificationCallback (DtTerrainChangeNotificationCallbackFcn fcn, void *user)
 
virtual void invokeTerrainChangeNotificationCallBacks ()
 
virtual void blockOnPendingOperations ()
 
virtual void setAssertOnBlockingTerrainCalls (bool assertBlock)
 
virtual bool assertOnBlockingTerrainCalls () const
 
virtual void setWarnOnBlockingTerrainCalls (bool warnBlock)
 
virtual bool warnOnBlockingTerrainCalls () const
 

Protected Attributes

DtTerrainImplementationmyTerrainImplementation
 
- Protected Attributes inherited from DtTerrainImplementation
DtTerrainInterfaceConfig myConfig
 
bool myAssertOnBlockingTerrainCalls
 
bool myWarnOnBlockingTerrainCalls
 
std::unique_ptr
< MAKVRinTerra::DtFeatureDatabase
myFeatureDatabase
 
std::unique_ptr
< MAKVRinTerra::DtFeatureContext
myFeatureContext
 
std::shared_ptr
< MAKVRinTerra::DtAerodromeLoader
myAerodromeLoader
 

Private Member Functions

 DtTerrainPassThroughLayer ()
 
 DtTerrainPassThroughLayer (const DtTerrainPassThroughLayer &orig)
 
DtTerrainPassThroughLayeroperator= (const DtTerrainPassThroughLayer &orig)
 

Additional Inherited Members

- Public Types inherited from DtTerrainImplementation
typedef boost::function< void(const
makVrv::DtDynamicTerrainFeature &)> 
DtDynamicTerrainQueryCallback
 
- Public Attributes inherited from DtTerrainImplementation
boost::signals2::signal< void(bool)> signal_terrainPaging
 

Constructor & Destructor Documentation

DtTerrainPassThroughLayer::DtTerrainPassThroughLayer ( )
private

Not implemented.

DtTerrainPassThroughLayer::DtTerrainPassThroughLayer ( const DtTerrainPassThroughLayer orig)
private

Not implemented.

DtTerrainPassThroughLayer::DtTerrainPassThroughLayer ( DtTerrainImplementation terrainImplementation,
DtConsoleCommandManager cmdMgr 
)

The implementation that this layer is wrapping must be passed in within the constructor.

virtual DtTerrainPassThroughLayer::~DtTerrainPassThroughLayer ( )
overridevirtual

Member Function Documentation

DtTerrainPassThroughLayer& DtTerrainPassThroughLayer::operator= ( const DtTerrainPassThroughLayer orig)
private

Not implemented.

virtual MAKVRinTerra::DtFeatureDatabase& DtTerrainPassThroughLayer::featureDatabase ( )
overridevirtual

Access feature database.

Reimplemented from DtTerrainImplementation.

virtual const MAKVRinTerra::DtFeatureDatabase& DtTerrainPassThroughLayer::featureDatabase ( ) const
overridevirtual

Reimplemented from DtTerrainImplementation.

virtual MAKVRinTerra::DtFeatureContext& DtTerrainPassThroughLayer::featureContext ( )
overridevirtual

Access feature context.

Reimplemented from DtTerrainImplementation.

virtual const MAKVRinTerra::DtFeatureContext& DtTerrainPassThroughLayer::featureContext ( ) const
overridevirtual

Reimplemented from DtTerrainImplementation.

virtual bool DtTerrainPassThroughLayer::loadTerrain ( const makArchives::DtGenericTerrainRecord rec)
overridevirtual

Loads a terrain given the terrain record.

Implements DtTerrainImplementation.

virtual const Coordinate_System* DtTerrainPassThroughLayer::coordinateSystem ( ) const
overridevirtual
virtual void DtTerrainPassThroughLayer::shutdown ( bool  block)
overridevirtual

Shutdown the terrain.

Reimplemented from DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::preloadTerrainAreas ( const DtTerrainPagingGeometryList preloadGeometry)
overridevirtual

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.

Parameters
preloadGeometryA list of the geometric areas that should be preloaded. They can be specified using any of the subclasses of DtTerrainPagingGeometry.
Note
The geometry set with this call completely replaces any geometry previously set using this call.
The default implementation for this is a noop.

Reimplemented from DtTerrainImplementation.

virtual bool DtTerrainPassThroughLayer::chordIntersect ( DtTerrainIntersectStatus status,
const DtChord chord,
DtVrfChordIntersectionRecord record,
const DtTerrainIntersectOptions options 
) const
overridevirtual

Returns topmost intersection of chord with terrain in record.

Implements DtTerrainImplementation.

Reimplemented in DtIntersectRecordPassThroughLayer, and DtIntersectTimerPassThroughLayer.

virtual bool DtTerrainPassThroughLayer::allIntersectsAlongChord ( DtTerrainIntersectStatus status,
const DtChord chord,
DtVrfChordIntersectRecordList intList,
const DtTerrainIntersectOptions options 
) const
overridevirtual

Returns all intersections of chord with terrain. intList is the list of each intersection record.

Implements DtTerrainImplementation.

Reimplemented in DtIntersectRecordPassThroughLayer, and DtIntersectTimerPassThroughLayer.

virtual void DtTerrainPassThroughLayer::cacheTerrainArea ( int  requestId,
unsigned  minLOD,
unsigned  maxLOD,
const DtExtent cacheArea,
DtCacheProgressCallbackFunction  fcn = 0,
void *  usr = 0 
)
overridevirtual

Passed through to terrain implementation.

Reimplemented from DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::cancelCacheTerrainArea ( int  requestId)
overridevirtual

Passed through to terrain implementation.

Reimplemented from DtTerrainImplementation.

virtual const DtTerrainCapabilities* DtTerrainPassThroughLayer::terrainCapabilities ( ) const
overridevirtual
Returns
A DtTerrainCapabilites structure that describes the capabilities of the currently loaded terrain.

Implements DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::setIntersectDataLoadExpireTime ( const double expireTime)
overridevirtual

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).

Parameters
expireTimeThe expiration time to be assigned to load data requests generated by intersect calls on the terrain implementation.

Reimplemented from DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::expireDataLoadRequestsBeforeTime ( const double currentTime)
overridevirtual

No-op. Override to expire data load requests generated before the given time. See comment for #setIntersectLoadDataExpireTime.

Parameters
currentTimeThe time to compare to data load requests to determine if they should be expired rather than executed.

Reimplemented from DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::processTrianglesInArea ( DtTriangleOutputInterface ,
const DtTerrainProcessPolygonsBox box,
DtTerrainCategoryMask  terrainCategoryMask 
) const
overridevirtual
virtual DtTerrainInformation* DtTerrainPassThroughLayer::terrainInformation ( )
overridevirtual

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 from DtTerrainImplementation.

Member Data Documentation

DtTerrainImplementation* DtTerrainPassThroughLayer::myTerrainImplementation
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)