20 #include <boost/scoped_ptr.hpp>
32 class DtTerrainImplementationDescriptor;
36 class DtGenericTerrainRecord;
95 virtual bool isSameTerrain(
const DtFilename&)
const;
99 virtual void addTerrainImplementation(
const DtString& implementationName,
106 virtual bool loadTerrain(
const DtString& filename,
109 virtual bool unloadTerrain();
110 virtual bool terrainIsLoaded();
113 virtual DtString loadedFilename()
const;
115 virtual const Coordinate_System* coordinateSystem()
const;
116 virtual Coordinate_System* coordinateSystem();
120 virtual std::auto_ptr<MAKVRinTerra::DtObstacleFeatureSet> obstacles(
const std::string& type)
const;
124 virtual std::auto_ptr<MAKVRinTerra::DtObstacleFeatureSet> obstacles(
127 virtual std::auto_ptr<MAKVRinTerra::DtPathFeatureSet> paths(
const std::string& type)
const;
129 virtual std::auto_ptr<MAKVRinTerra::DtFeatureSet> allFeatures(
130 const std::string& type = std::string(),
bool readDirectly =
false)
const;
148 virtual double terrainHeightAboveSeaLevel(
const DtPoint& databaseLocation,
149 bool* dataAvailable = 0,
bool overrideBlockingAssert =
false)
const;
174 virtual bool terrainHeightAndIntersection(
const DtVector& localLocation,
175 double& height, DtChordIntersectionRecord& record,
176 DtIntersectionRecord::DtIntersectionType irtFlag =
177 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
178 bool overrideBlockingAssert =
false)
const;
264 virtual bool terrainHeightUnderWater(
const DtVector& databaseLocation,
265 double& groundHeight, DtSurface& groundSurface,
DtVector& groundNormal,
266 double& waterHeight, DtSurface::DtMedium &topSurfaceMedium,
267 bool* dataAvailable = 0,
bool overrideBlockingAssert =
false) ;
272 virtual bool terrainHeightUnderWaterDebug(
const DtVector& databaseLocation,
273 double& groundHeight, DtSurface& groundSurface,
DtVector& groundNormal,
274 double& waterHeight, DtSurface::DtMedium &topSurfaceMedium,
276 bool* dataAvailable =0,
bool overrideBlockingAssert =
false) ;
320 virtual bool closestIntersection(
const DtVector& localLocation,
321 DtPoint& intersectionPoint,
bool* dataAvailable = 0,
322 bool overrideBlockingAssert =
false)
const;
345 virtual bool closestIntersection(
double lat,
double lon,
346 DtPoint& intersectionPoint,
bool* dataAvailable = 0,
347 bool overrideBlockingAssert =
false)
const;
373 virtual bool closestIntersection(
const DtVector& localLocation,
374 DtChordIntersectionRecord& record,
375 DtIntersectionRecord::DtIntersectionType irtFlag =
376 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
377 bool overrideBlockingAssert =
false)
const;
403 virtual bool closestIntersection(
double lat,
double lon,
404 DtChordIntersectionRecord& record,
405 DtIntersectionRecord::DtIntersectionType irtFlag =
406 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
407 bool overrideBlockingAssert =
false)
const;
436 virtual bool closestIntersection(
const std::list<DtVector>& localLocationList,
437 DtChordIntersectRecordList& recordList,
int& numIntersections,
438 DtIntersectionRecord::DtIntersectionType irtFlag =
439 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
440 bool overrideBlockingAssert =
false)
const;
469 virtual bool intersect(
const DtChord& chord, DtPoint& intersectionPoint,
470 double& intersectionTime,
bool* dataAvailable = 0,
471 bool overrideBlockingAssert =
false)
const;
499 virtual bool intersect(
const DtChord& chord,
500 DtChordIntersectionRecord& record,
501 DtIntersectionRecord::DtIntersectionType irtFlag =
502 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
503 bool overrideBlockingAssert =
false)
const;
528 virtual bool intersect(
const DtSphere& sphere,
529 DtSphereIntersectionRecord& record,
530 DtIntersectionRecord::DtIntersectionType irtFlag =
531 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
532 bool overrideBlockingAssert =
false)
const;
560 virtual bool allIntersectsAlongChord(
const DtChord& chord,
561 DtChordIntersectRecordList& intList,
562 DtIntersectionRecord::DtIntersectionType irtFlag =
563 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
564 bool overrideBlockingAssert =
false)
const;
569 virtual bool allIntersectsAlongChordDebug(
const DtChord& chord,
570 DtChordIntersectRecordList& intList,
571 bool* dataAvailable = 0,
572 bool overrideBlockingAssert =
false)
const;
605 virtual bool intersectList(
const std::list<DtChord>& chordList,
606 DtChordIntersectRecordList& recordList,
int& numTerrainIntersections,
607 DtIntersectionRecord::DtIntersectionType irtFlag =
608 DtIntersectionRecord::INT_ALL_DATA,
bool* dataAvailable = 0,
609 bool overrideBlockingAssert =
false)
const;
625 virtual void preloadTerrainAreas(
638 virtual bool addTerrainPassThroughLayer(
const DtString& layerType);
649 virtual void setAssertOnBlockingTerrainCalls(
bool assertBlock);
650 virtual bool assertOnBlockingTerrainCalls()
const;
657 virtual void setIntersectDataLoadExpireTime(
const double& expireTime);
658 virtual void expireDataLoadRequestsBeforeTime(
const double& currentTime);
663 virtual void setDataPath(
const std::string&);
664 virtual std::string dataPath()
const;
669 virtual void setUserDataPath(
const std::string&);
670 virtual std::string userDataPath()
const;
682 static void setModelDefinitionFilePath(
const DtString& fullFilePath);
683 static DtString modelDefinitionFilePath();
688 virtual boost::shared_ptr<DtAsyncJobMapEntry> makePathAsync(
const DtPoint& localStart,
689 const DtPoint& localDestination,
const std::string& type,
690 const double& maxSearchRadius,
const double& startProximityThreshold,
696 virtual bool onPathFeature(
697 const DtPoint& location,
const DtString& type,
double buffer = 0.5);
702 virtual boost::shared_ptr<DtAsyncJobMapEntry> addAsyncJob(
DtAsyncJob* job);
711 const double topoDistance(
const DtPoint& start,
const DtPoint& end,
724 const std::string& type,
const DtPoint& startingLocation,
725 const double& searchRadius,
bool* dataAvailable = NULL);
728 std::vector<DtChord>& chords)
const;
730 void breakUpChord(
const DtChord& chord, std::vector<DtChord>& chords)
const;
732 virtual boost::shared_ptr<DtTerrainInterfaceConfig> config()
const;
746 virtual bool nonPolygonalWaterHeight(
const DtVector& localLocation,
747 double& height)
const;
752 virtual double defaultWaterDepth(
const DtVector& localLocation)
const;
756 virtual double defaultSurfaceElevation(
const DtVector& localLocation)
const;
773 virtual DtSurface::DtMedium mediumForUnspecPolygonsUnderWater()
const;
786 virtual double landAboveWaterMinimumSeparation()
const;
790 void insertNonPolyWaterIntoIntersectionList(
791 DtChordIntersectionRecord& waterInterx,
792 DtChordIntersectRecordList& intrxList)
const;
801 virtual DtChordIntersectionRecord blankSurfaceIntersectionRecord(
802 const DtVector& localLocation,
const double height)
const;
808 virtual bool nonPolygonalWaterIntersect(
const DtChord& chord,
809 DtChordIntersectionRecord& waterInterxRecord)
const;
824 const DtPoint& localStart,
const DtPoint& localDestination,
825 const std::string& type,
const double& maxSearchRadius,
826 const double& startProximityThreshold,
827 boost::function<
bool ()> cancelCheck,
832 virtual void loadConfigurationFile(
const DtFilename& filename);
864 boost::shared_ptr<DtTerrainInterfaceConfig>
myConfig;
869 #define DtRegisterTerrainImplementationFunctionName "DtRegisterTerrainImplementation"