VR-Forces 4.7 Class Documentation
 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. 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 shutdown (bool block)
 Shutdown the terrain.
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 (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const
 Returns topmost intersection of chord with terrain in record.
virtual bool allIntersectsAlongChord (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const
 Returns all intersections of chord with terrain.
virtual void cacheInformationForTerrainArea (unsigned minLOD, unsigned maxLOD, const DtExtent &cacheArea, double &estimatedTime, double &estimatedSize, std::vector< std::string > &elevationLayers, std::vector< std::string > &modelLayers, std::vector< std::string > &featureLayers) const
 Passed through to terrain implementation.
virtual void cacheTerrainArea (int requestId, unsigned minLOD, unsigned maxLOD, 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.
virtual void processTrianglesInArea (DtTriangleOutputInterface &, const DtTerrainProcessPolygonsBox &box) const
- 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 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 dataAvailable (const DtTerrainPagingGeometryList &geometry, DtTerrainIntersectOptions::Fidelity=DtTerrainIntersectOptions::MAX_FIDELITY)
 Returns true if all of the terrain which intersects the geometry list is paged in.
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 DtTerrainGeometryHandlecreateEntityGeometry (const DtFilename &file)
 Create geometry in the terrain which represents the entity.
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, bool useOriginalGeometry=false)
 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, bool useOriginalGeometry=false)
virtual void writeTerrainIndex (const DtString &name)
 Write terrain index.
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::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::cacheInformationForTerrainArea ( unsigned  minLOD,
unsigned  maxLOD,
const DtExtent cacheArea,
double estimatedTime,
double estimatedSize,
std::vector< std::string > &  elevationLayers,
std::vector< std::string > &  modelLayers,
std::vector< std::string > &  featureLayers 
) const
virtual

Passed through to terrain implementation.

Reimplemented from DtTerrainImplementation.

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

Member Data Documentation

DtTerrainImplementation* DtTerrainPassThroughLayer::myTerrainImplementation
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)