VR-Forces 4.1 Class Documentation
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 bool loadTerrain (const makArchives::DtGenericTerrainRecord &rec, MAKVRinTerra::DtFeatureLoader &, const std::map< std::string, std::string > &settings=(std::map< std::string, std::string >()))
 Loads a terrain given the terrain record and a key/value pair of settings.
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, DtChordIntersectionRecord &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, DtChordIntersectRecordList &intList, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const
 Returns all intersections of chord with terrain.
virtual bool sphereIntersect (const DtSphere &sphere, DtSphereIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const
 Returns intersection of sphere with the terrain in the record irtFlag specifies what intersection data should be filled in for the record.
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 processTrianglesInArea (DtTriangleCallbackFcn func, DtTriangleCallbackFinalizeFcn finalize, DtTerrainProcessPolygonsBox &box, void *usr) const
virtual void breakUpChords (const MAKVRinTerra::DtProj &, const DtChord &chord, std::vector< DtChord > &chords)
virtual void setAssertOnBlockingTerrainCalls (bool assertBlock)
 Determines if an exception should be thrown if a blocking terrain call is made.
virtual bool assertOnBlockingTerrainCalls () const
 Determines if an exception should be thrown if a blocking terrain call is made.

Protected Attributes

DtTerrainImplementationmyTerrainImplementation
- Protected Attributes inherited from DtTerrainImplementation
bool myAssertOnBlockingTerrainCalls
 Determines if an exception should be thrown if a blocking terrain call is made.
TerrainSettings mySettings
 Settings used for this implementation.

Private Member Functions

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

Additional Inherited Members

- Public Types inherited from DtTerrainImplementation
typedef std::map< std::string,
std::string > 
TerrainSettings

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

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 bool DtTerrainPassThroughLayer::loadTerrain ( const makArchives::DtGenericTerrainRecord rec,
MAKVRinTerra::DtFeatureLoader featureLoader,
const std::map< std::string, std::string > &  settings = (std::map< std::string, std::string >()) 
)
virtual

Loads a terrain given the terrain record and a key/value pair of settings.

These settings are interpreted (or not) by the implementation

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,
DtChordIntersectionRecord 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.

Implements DtTerrainImplementation.

Reimplemented in DtIntersectTimerPassThroughLayer.

virtual bool DtTerrainPassThroughLayer::allIntersectsAlongChord ( const DtChord chord,
DtChordIntersectRecordList 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.

Implements DtTerrainImplementation.

Reimplemented in DtIntersectTimerPassThroughLayer.

virtual bool DtTerrainPassThroughLayer::sphereIntersect ( const DtSphere sphere,
DtSphereIntersectionRecord record,
DtIntersectionRecord::DtIntersectionType  irtFlag = DtIntersectionRecord::INT_ALL_DATA,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const
virtual

Returns intersection of sphere with the terrain in the record irtFlag specifies what intersection data should be filled in for the record.

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 Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)