VR-Forces 5.0.2 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 ()
 
virtual
MAKVRinTerra::DtFeatureDatabase
featureDatabase ()
 
virtual const
MAKVRinTerra::DtFeatureDatabase
featureDatabase () const
 
virtual
MAKVRinTerra::DtFeatureContext
featureContext ()
 
virtual const
MAKVRinTerra::DtFeatureContext
featureContext () const
 
virtual bool loadTerrain (const makArchives::DtGenericTerrainRecord &rec)
 
virtual const Coordinate_SystemcoordinateSystem () const
 
virtual void shutdown (bool block)
 
virtual void preloadTerrainAreas (const DtTerrainPagingGeometryList &preloadGeometry)
 
virtual bool chordIntersect (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const
 
virtual bool allIntersectsAlongChord (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const
 
virtual void cacheTerrainArea (int requestId, unsigned minLOD, unsigned maxLOD, const DtExtent &cacheArea, DtCacheProgressCallbackFunction fcn=0, void *usr=0)
 
virtual void cancelCacheTerrainArea (int requestId)
 
virtual const
DtTerrainCapabilities
terrainCapabilities () const
 
virtual void setIntersectDataLoadExpireTime (const double &expireTime)
 
virtual void expireDataLoadRequestsBeforeTime (const double &currentTime)
 
virtual void processTrianglesInArea (DtTriangleOutputInterface &, const DtTerrainProcessPolygonsBox &box) const
 
virtual DtTerrainInformationterrainInformation ()
 
- Public Member Functions inherited from DtTerrainImplementation
 DtTerrainImplementation (DtConsoleCommandManager *cmdManager)
 
virtual ~DtTerrainImplementation ()
 
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 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 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
 
boost::scoped_ptr
< MAKVRinTerra::DtFeatureDatabase
myFeatureDatabase
 
boost::scoped_ptr
< MAKVRinTerra::DtFeatureContext
myFeatureContext
 

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
 

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 ( )
virtual

Member Function Documentation

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

Not implemented.

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

Access feature database.

Reimplemented from DtTerrainImplementation.

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

Reimplemented from DtTerrainImplementation.

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

Access feature context.

Reimplemented from DtTerrainImplementation.

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

Reimplemented from DtTerrainImplementation.

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

Loads a terrain given the terrain record.

Implements DtTerrainImplementation.

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

Shutdown the terrain.

Reimplemented from DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::preloadTerrainAreas ( const DtTerrainPagingGeometryList preloadGeometry)
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.

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
virtual

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
virtual

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

Passed through to terrain implementation.

Reimplemented from DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::cancelCacheTerrainArea ( int  requestId)
virtual

Passed through to terrain implementation.

Reimplemented from DtTerrainImplementation.

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

Implements DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::setIntersectDataLoadExpireTime ( const double expireTime)
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).

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

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 
) const
virtual
virtual DtTerrainInformation* DtTerrainPassThroughLayer::terrainInformation ( )
virtual

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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)