20 #include <boost/scoped_ptr.hpp>
32 #include <boost/ptr_container/ptr_list.hpp>
35 class DtTerrainImplementationDescriptor;
39 class DtGenericTerrainRecord;
93 virtual void setConfigFile(
const std::string&,
bool reload=
true);
102 virtual bool isSameTerrain(
const DtFilename&)
const;
106 virtual void addTerrainImplementation(
const DtString& implementationName,
113 virtual bool loadTerrain(
const DtString& filename);
116 virtual bool unloadTerrain(
bool block =
true);
118 virtual bool terrainIsLoaded();
121 virtual DtString loadedFilename()
const;
123 virtual const Coordinate_System* coordinateSystem()
const;
124 virtual Coordinate_System* coordinateSystem();
128 virtual std::auto_ptr<MAKVRinTerra::DtAreaFeatureSet> areas(
129 const std::string& type,
130 const boost::shared_ptr<DtCallbackQueue>& = boost::shared_ptr<DtCallbackQueue>())
const;
134 virtual std::auto_ptr<MAKVRinTerra::DtAreaFeatureSet> areas(
136 const boost::shared_ptr<DtCallbackQueue>& = boost::shared_ptr<DtCallbackQueue>())
const;
139 virtual std::auto_ptr<MAKVRinTerra::DtAreaFeatureSet> LOSfeatures()
const;
141 virtual std::auto_ptr<MAKVRinTerra::DtPathFeatureSet> paths(
const std::string& type)
const;
145 virtual std::auto_ptr<MAKVRinTerra::DtFeatureSet> features(
146 const std::string& queryName)
const;
149 virtual std::auto_ptr<MAKVRinTerra::DtFeatureSet> allFeatures()
const;
153 virtual std::auto_ptr<MAKVRinTerra::DtFeatureSet> featuresRaw(
154 const std::string& queryName)
const;
157 virtual std::auto_ptr<MAKVRinTerra::DtFeatureSet> allFeaturesRaw()
const;
174 virtual double terrainHeightAboveSeaLevel(
const DtPoint& databaseLocation,
175 bool* dataAvailable = 0,
bool overrideBlockingAssert =
false)
const;
199 virtual bool terrainHeightAndIntersection(
const DtVector& localLocation,
200 double& height, DtChordIntersectionRecord& record,
201 DtIntersectionRecord::DtIntersectionType irtFlag =
202 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
203 bool overrideBlockingAssert =
false)
const;
207 virtual bool terrainHeightAndIntersectionBelow(
const DtVector& localLocation,
208 double& height, DtChordIntersectionRecord& record,
209 DtIntersectionRecord::DtIntersectionType irtFlag =
210 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
211 bool overrideBlockingAssert =
false)
const;
340 virtual bool terrainHeightUnderWater(
const DtVector& databaseLocation,
341 double& groundHeight, DtSurface& groundSurface,
DtVector& groundNormal,
342 double& waterHeight, DtSurface::DtMedium &topSurfaceMedium,
343 bool* dataAvailable = 0,
bool overrideBlockingAssert =
false) ;
348 virtual bool terrainHeightUnderWaterDebug(
const DtVector& databaseLocation,
349 double& groundHeight, DtSurface& groundSurface,
DtVector& groundNormal,
350 double& waterHeight, DtSurface::DtMedium &topSurfaceMedium,
352 bool* dataAvailable =0,
bool overrideBlockingAssert =
false) ;
395 virtual bool closestIntersection(
const DtVector& localLocation,
396 DtPoint& intersectionPoint,
bool* dataAvailable = 0,
397 bool overrideBlockingAssert =
false)
const;
419 virtual bool closestIntersection(
double lat,
double lon,
420 DtPoint& intersectionPoint,
bool* dataAvailable = 0,
421 bool overrideBlockingAssert =
false)
const;
446 virtual bool closestIntersection(
const DtVector& localLocation,
447 DtChordIntersectionRecord& record,
448 DtIntersectionRecord::DtIntersectionType irtFlag =
449 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
450 bool overrideBlockingAssert =
false)
const;
475 virtual bool closestIntersection(
double lat,
double lon,
476 DtChordIntersectionRecord& record,
477 DtIntersectionRecord::DtIntersectionType irtFlag =
478 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
479 bool overrideBlockingAssert =
false)
const;
507 virtual bool closestIntersection(
const std::list<DtVector>& localLocationList,
508 DtChordIntersectRecordList& recordList,
int& numIntersections,
509 DtIntersectionRecord::DtIntersectionType irtFlag =
510 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
511 bool overrideBlockingAssert =
false)
const;
539 virtual bool intersect(
const DtChord& chord, DtPoint& intersectionPoint,
540 double& intersectionTime,
bool* dataAvailable = 0,
541 bool overrideBlockingAssert =
false)
const;
568 virtual bool intersect(
const DtChord& chord,
569 DtChordIntersectionRecord& record,
570 DtIntersectionRecord::DtIntersectionType irtFlag =
571 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
572 bool overrideBlockingAssert =
false)
const;
599 virtual bool allIntersectsAlongChord(
const DtChord& chord,
600 DtChordIntersectRecordList& intList,
601 DtIntersectionRecord::DtIntersectionType irtFlag =
602 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
603 bool overrideBlockingAssert =
false)
const;
608 virtual bool allIntersectsAlongChordDebug(
const DtChord& chord,
609 DtChordIntersectRecordList& intList,
610 bool* dataAvailable = 0,
611 bool overrideBlockingAssert =
false)
const;
643 virtual bool intersectList(
const std::list<DtChord>& chordList,
644 DtChordIntersectRecordList& recordList,
int& numTerrainIntersections,
645 DtIntersectionRecord::DtIntersectionType irtFlag =
646 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
647 bool overrideBlockingAssert =
false)
const;
663 virtual void preloadTerrainAreas(
671 virtual void forceLoadTerrainAreas(
684 virtual bool addTerrainPassThroughLayer(
const DtString& layerType);
695 virtual void setAssertOnBlockingTerrainCalls(
bool assertBlock);
696 virtual bool assertOnBlockingTerrainCalls()
const;
703 virtual void setIntersectDataLoadExpireTime(
const double& expireTime);
704 virtual void expireDataLoadRequestsBeforeTime(
const double& currentTime);
719 virtual boost::shared_ptr<DtAsyncJobMapEntry> makePathAsync(
720 const DtPoint& localStart,
721 const DtPoint& localDestination,
722 const std::string& type,
723 const double& maxSearchRadius,
724 const double& startProximityThreshold,
742 const DtPoint& localStart,
743 const DtPoint& localDestination,
744 const std::string& type,
745 const double& maxSearchRadius,
746 const double& startProximityThreshold,
747 boost::function<
bool ()> cancelCheck,
753 virtual bool onPathFeature(
754 const DtPoint& location,
const DtString& type,
double buffer = 0.5);
762 virtual boost::shared_ptr<DtAsyncJobMapEntry> addAsyncJob(
DtAsyncJob* job);
771 const double topoDistance(
const DtPoint& start,
const DtPoint& end,
784 const std::string& type,
const DtPoint& startingLocation,
785 const double& searchRadius,
bool* dataAvailable = NULL);
788 std::vector<DtChord>& chords)
const;
790 void breakUpChord(
const DtChord& chord, std::vector<DtChord>& chords)
const;
804 virtual bool nonPolygonalWaterHeight(
const DtVector& localLocation,
805 double& height)
const;
810 virtual double defaultWaterDepth(
const DtVector& localLocation)
const;
814 virtual double defaultSurfaceElevation(
const DtVector& localLocation)
const;
831 virtual DtSurface::DtMedium mediumForUnspecPolygonsUnderWater()
const;
844 virtual double landAboveWaterMinimumSeparation()
const;
848 void insertNonPolyWaterIntoIntersectionList(
849 DtChordIntersectionRecord& waterInterx,
850 DtChordIntersectRecordList& intrxList)
const;
859 virtual DtChordIntersectionRecord blankSurfaceIntersectionRecord(
860 const DtVector& localLocation,
const double height)
const;
866 virtual bool nonPolygonalWaterIntersect(
const DtChord& chord,
867 DtChordIntersectionRecord& waterInterxRecord)
const;
910 #define DtRegisterTerrainImplementationFunctionName "DtRegisterTerrainImplementation"
917 #define DtDeregisterTerrainImplementationFunctionName "DtDeregisterTerrainImplementation"