![]() |
VR-Forces 4.0.4 Class Documentation
|
This class is the base class for creating a "pass-though" layer in the terrain interface. More...

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_System * | coordinateSystem () 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 DtVectorNetwork * | vectorNetwork () const |
| virtual const DtTerrainCapabilities * | terrainCapabilities () const |
| virtual void | setIntersectDataLoadExpireTime (const double &expireTime) |
| No-op. | |
| virtual void | expireDataLoadRequestsBeforeTime (const double ¤tTime) |
| No-op. | |
Protected Attributes | |
| DtTerrainImplementation * | myTerrainImplementation |
Private Member Functions | |
| DtTerrainPassThroughLayer () | |
| Not implemented. | |
| DtTerrainPassThroughLayer (const DtTerrainPassThroughLayer &orig) | |
| Not implemented. | |
| DtTerrainPassThroughLayer & | operator= (const DtTerrainPassThroughLayer &orig) |
| Not implemented. | |
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.
| 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] |
| 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 const Coordinate_System* DtTerrainPassThroughLayer::coordinateSystem | ( | ) | const [virtual] |
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.
| preloadGeometry | A list of the geometric areas that should be preloaded. They can be specified using any of the subclasses of DtTerrainPagingGeometry. |
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] |
Implements DtTerrainImplementation.
| virtual const DtTerrainCapabilities* DtTerrainPassThroughLayer::terrainCapabilities | ( | ) | const [virtual] |
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).
| expireTime | The 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.
| currentTime | The time to compare to data load requests to determine if they should be expired rather than executed. |
Reimplemented from DtTerrainImplementation.