VR-Forces 4.0.4 Class Documentation
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]

List of all members.

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, 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 bool intersectVectorNetwork (const DtChord &chord, DtVectorNetworkRecord *vectorRecord, DtVectorNetworkIntersectionRecord *vectorIntersectionRecord) const
 User passes in the chord to intersect the vector network and the vectorRecord defining the desired search parameters like the kind of features to be searched.
virtual const DtVectorNetworkvectorNetwork () const
virtual const
DtTerrainCapabilities
terrainCapabilities () const
virtual void setIntersectDataLoadExpireTime (const double &expireTime)
 No-op.
virtual void expireDataLoadRequestsBeforeTime (const double &currentTime)
 No-op.

Protected Attributes

DtTerrainImplementationmyTerrainImplementation

Private Member Functions

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

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

Not implemented.

Not implemented.

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


Member Function Documentation

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

Not implemented.

virtual bool DtTerrainPassThroughLayer::loadTerrain ( const makArchives::DtGenericTerrainRecord rec,
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 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 bool DtTerrainPassThroughLayer::intersectVectorNetwork ( const DtChord chord,
DtVectorNetworkRecord vectorRecord,
DtVectorNetworkIntersectionRecord vectorIntersectionRecord 
) const [virtual]

User passes in the chord to intersect the vector network and the vectorRecord defining the desired search parameters like the kind of features to be searched.

Returns the best feature intersection and associated data in the vectorIntersectionRecord if there is an intersection. Returns false if there is no intersection.

Implements DtTerrainImplementation.

virtual const DtVectorNetwork* DtTerrainPassThroughLayer::vectorNetwork ( ) 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


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)