![]() |
VR-Forces 5.0.2 Developer's Guide
|
this class encapsulates all terrain queries made by DtTerrainReasoner. This keeps DtTerrainReasoner completely decoupled from actual terrain representation (effectively DtPhysicalWorld). Using a stub version of DtTerrainAccessor allows testing DtTerrainReasoner with particular debug input that is not readily available in actual terrain.
As DtTerrainReasoner uses topographic coordinates, DtTerrainAccessor handles all necessary transformations between topographic and local coordinates. An instance of DtTerrainAccessor is constructed for each DtTerrainReasoner query (find* method) and gets destructed when the query ends. The instance maintains query specific coordinate transformation context.
Public Member Functions | |
| DtTerrainAccessor (const DtPhysicalWorld &physicalWorld, DtVector coordTransformOriginLocal) | |
| ~DtTerrainAccessor () | |
| bool | checkLineOfSight (DtVector fromLocal, DtVector toLocal) const |
| bool | checkLineOfFire (DtVector fromLocal, DtVector toLocal) const |
| double | elevationAtPoint (DtVector pointLocal) const |
| DtVector | localToTopo (DtVector pointLocal) const |
| DtVector | topoToLocal (double topoX, double topoY, double heightAboveGround=0) const |
Private Attributes | |
| const DtPhysicalWorld & | myPhysicalWorld |
| DtCoordTransform * | myTopoToLocalX |
| DtCoordTransform * | myLocalToTopoX |
| double | myTempOriginHeight |
| DtTerrainAccessor::DtTerrainAccessor | ( | const DtPhysicalWorld & | physicalWorld, |
| DtVector | coordTransformOriginLocal | ||
| ) |
| DtTerrainAccessor::~DtTerrainAccessor | ( | ) |
| DtVector DtTerrainAccessor::topoToLocal | ( | double | topoX, |
| double | topoY, | ||
| double | heightAboveGround = 0 |
||
| ) | const |
|
private |
|
private |
|
private |
|
private |