VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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. More...

Inheritance diagram for DtTerrainPassThroughLayer:
Inheritance graph
[legend]

Classes

struct  DtCreatorParam

Public Member Functions

 DtTerrainPassThroughLayer (DtTerrainImplementation *terrainImplementation, DtConsoleCommandManager *cmdMgr)
 The implementation that this layer is wrapping must be passed in within the constructor.
virtual ~DtTerrainPassThroughLayer ()
virtual
MAKVRinTerra::DtFeatureDatabase
featureDatabase ()
 Access feature database.
virtual const
MAKVRinTerra::DtFeatureDatabase
featureDatabase () const
virtual
MAKVRinTerra::DtFeatureContext
featureContext ()
 Access feature context.
virtual const
MAKVRinTerra::DtFeatureContext
featureContext () const
virtual bool loadTerrain (const makArchives::DtGenericTerrainRecord &rec)
 Loads a terrain given the terrain record.
virtual const Coordinate_SystemcoordinateSystem () const
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 bool chordIntersect (const DtChord &chord, DtVrfChordIntersectionRecord &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, DtVrfChordIntersectRecordList &intList, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const
 Returns all intersections of chord with terrain.
virtual void cacheInformationForTerrainArea (int requestId, int lowestLOD, int highestLOD, const DtExtent &cacheArea, double &estimatedTime, double &estimatedSize, std::vector< std::string > &elevationLayers, std::vector< std::string > &modelLayers) const
 Passed through to terrain implementation.
virtual void cacheTerrainArea (int requestId, int lowestLOD, int highestLOD, const DtExtent &cacheArea, DtCacheProgressCallbackFunction fcn=0, void *usr=0)
 Passed through to terrain implementation.
virtual void cancelCacheTerrainArea (int requestId)
 Passed through to terrain implementation.
virtual const
DtTerrainCapabilities
terrainCapabilities () const
virtual void setIntersectDataLoadExpireTime (const double &expireTime)
 No-op.
virtual void expireDataLoadRequestsBeforeTime (const double &currentTime)
 No-op.
- Public Member Functions inherited from DtTerrainImplementation
 DtTerrainImplementation (DtConsoleCommandManager *cmdManager)
virtual ~DtTerrainImplementation ()
virtual void init ()
 Called immediately after creation.
virtual void finishedLoading (const MAKVRinTerra::DtProj &proj)
 Called after terrain loaded successfully.
virtual void shutdown (bool block=true)
 Shutdown the terrain.
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.
virtual bool createFromExtent (const Dt3dBoundingVolume &)
 Creates an extent from the given extent. Not all implementations will support this.
virtual bool loadModel (const DtFilename &, const DtEntityType &t=DtEntityType())
 Defaults to loading terrain for gdb.
virtual DtTerrainInterfaceConfigconfigurationOptions ()
virtual const
DtTerrainInterfaceConfig
configurationOptions () const
virtual bool chordIntersect (const DtChord &chord, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const =0
 Returns topmost intersection of chord with terrain in record.
virtual bool allIntersectsAlongChord (const DtChord &chord, DtVrfChordIntersectRecordList &intList, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const =0
 Returns all intersections of chord with terrain.
virtual void processTrianglesInArea (DtTriangleCallbackFcn func, DtTriangleCallbackFinalizeFcn finalize, DtTerrainProcessPolygonsBox &box, void *usr) const
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.
virtual
DtDynamicTerrainRequestHandle 
addDynamicTerrainChangeRequest (double time, makVrv::DtDynamicTerrainChange *command)
 Add a dynamic terrain change request to the system.
virtual DtDynamicTerrainQueryHandle queryDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0)
 Install a query which will call the supplied callback on matching dynamic terrain features as they are paged in.
virtual void queryCurrentDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0)
virtual void setAssertOnBlockingTerrainCalls (bool assertBlock)
 Determines if an exception should be thrown if a blocking terrain call is made.
virtual bool assertOnBlockingTerrainCalls () const
virtual void setWarnOnBlockingTerrainCalls (bool warnBlock)
 Determines if a warning should be printed out if a blocking terrain call is made.
virtual bool warnOnBlockingTerrainCalls () const

Protected Attributes

DtTerrainImplementationmyTerrainImplementation
- Protected Attributes inherited from DtTerrainImplementation
DtTerrainInterfaceConfig myConfig
bool myAssertOnBlockingTerrainCalls
 Determines if an exception should be thrown if a blocking terrain call is made.
bool myWarnOnBlockingTerrainCalls
boost::scoped_ptr
< MAKVRinTerra::DtFeatureDatabase
myFeatureDatabase
boost::scoped_ptr
< MAKVRinTerra::DtFeatureContext
myFeatureContext

Private Member Functions

 DtTerrainPassThroughLayer ()
 Not implemented.
 DtTerrainPassThroughLayer (const DtTerrainPassThroughLayer &orig)
DtTerrainPassThroughLayeroperator= (const DtTerrainPassThroughLayer &orig)

Additional Inherited Members

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

Detailed Description

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.

Constructor & Destructor Documentation

DtTerrainPassThroughLayer::DtTerrainPassThroughLayer ( )
private

Not implemented.

DtTerrainPassThroughLayer::DtTerrainPassThroughLayer ( const DtTerrainPassThroughLayer orig)
private
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
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::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 ( const DtChord chord,
DtVrfChordIntersectionRecord 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.

irtFlag specifies what intersection data should be filled in for the record.

virtual bool DtTerrainPassThroughLayer::allIntersectsAlongChord ( const DtChord chord,
DtVrfChordIntersectRecordList intList,
DtIntersectionRecord::DtIntersectionType  irtFlag = DtIntersectionRecord::INT_ALL_DATA,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const
virtual

Returns all intersections of chord with terrain.

intList is the list of each intersection record. irtFlag specifies what intersection data should be filled in for the record.

virtual void DtTerrainPassThroughLayer::cacheInformationForTerrainArea ( int  requestId,
int  lowestLOD,
int  highestLOD,
const DtExtent cacheArea,
double estimatedTime,
double estimatedSize,
std::vector< std::string > &  elevationLayers,
std::vector< std::string > &  modelLayers 
) const
virtual

Passed through to terrain implementation.

Implements DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::cacheTerrainArea ( int  requestId,
int  lowestLOD,
int  highestLOD,
const DtExtent cacheArea,
DtCacheProgressCallbackFunction  fcn = 0,
void *  usr = 0 
)
virtual

Passed through to terrain implementation.

Implements DtTerrainImplementation.

virtual void DtTerrainPassThroughLayer::cancelCacheTerrainArea ( int  requestId)
virtual

Passed through to terrain implementation.

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

Member Data Documentation

DtTerrainImplementation* DtTerrainPassThroughLayer::myTerrainImplementation
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)