![]() |
VR-Forces 4.7 Class Documentation
|
DtTerrainInterface allows access to common terrain calls without having to know the terrain implementation. More...
Classes | |
| struct | OceanLayer |
| Global ocean layer info; used in conjunction with the polygon data. More... | |
Public Types | |
| enum | LoadContext { VrfSimulationBackEnd = 1, NavGenerationTool = 2 } |
| typedef MAKVRinTerra::DtAStarGraph | DtAStarGraph |
Public Member Functions | |
| DtTerrainInterface () | |
| Constructor. | |
| virtual | ~DtTerrainInterface () |
| Destructor. | |
| virtual bool | init (bool createConsoleManager=true) |
| Virtual initialization. | |
| virtual void | setConfigFile (const std::string &, bool reload=true) |
| Set the config file which will attempt to be loaded during init. | |
| virtual const DtTerrainInterfaceConfig & | configOptions () const |
| Current config options. | |
| virtual void | tick () |
| Cleans up finished async server jobs, and checks for path finder removal. | |
| virtual bool | isSameTerrain (const DtFilename &) const |
| Returns true if this terrain is the same terrain as is currently open. | |
| DtTerrainImplementation * | terrainImplementation () const |
| Returns the current terrain implementation. | |
| virtual void | addTerrainImplementation (const DtString &implementationName, DtTerrainImplementationCreatorFcn creatorFcn) |
| Add a terrain implementation type to the set of terrain implementations that can be used by this interface. | |
| virtual void | addFeatureLayer (MAKVRinTerra::DtFeatureSet *) |
| Add a feature layer that will be added to the feature database. | |
| virtual void | addFeatureLayer (boost::shared_ptr< MAKVRinTerra::DtFeatureSet >) |
| virtual void | addGenericTerrainRecordCallback (const DtString &recordType, DtGenericTerrainRecordCallbackFunction fcn, void *user) |
| virtual void | removeGenericTerrainRecordCallback (const DtString &recordType, DtGenericTerrainRecordCallbackFunction fcn, void *user) |
| virtual void | invokeGenericTerrainRecordCallbacks (makArchives::DtGenericTerrainRecord *record) |
| virtual bool | loadTerrain (const DtString &filename, LoadContext context=VrfSimulationBackEnd) |
| Settings will be merged into existing – not replace. | |
| virtual bool | unloadTerrain (bool block=true) |
| virtual bool | loadModel (const DtFilename &f, const DtEntityType &t=DtEntityType(), bool hasOceanLayer=true) |
| Loads a model from the specified file. | |
| virtual double | modelHeightDifferencesFromAppearances (int oldApp, int newApp) const |
| If supported by the interface, return the height difference from the currently loaded model as a transition from the old appearance to the new appearance. | |
| virtual bool | terrainIsLoaded () |
| Creates a terrain from the given extent. | |
| virtual DtString | loadedFilename () const |
| virtual const Coordinate_System * | coordinateSystem () const |
| virtual Coordinate_System * | coordinateSystem () |
| virtual std::auto_ptr < MAKVRinTerra::DtAreaFeatureSet > | areas (const std::string &type, const boost::shared_ptr< DtVrfCallbackQueue > &=boost::shared_ptr< DtVrfCallbackQueue >()) const |
| Returns a DtAreaFeatureSet configured using the provided type. | |
| virtual std::auto_ptr < MAKVRinTerra::DtAreaFeatureSet > | areas (const MAKVRinTerra::DtAreaFeatureSetAdapter::Config &config, const boost::shared_ptr< DtVrfCallbackQueue > &=boost::shared_ptr< DtVrfCallbackQueue >()) const |
| Returns a DtAreaFeatureSet configured using the provided type and parameters. | |
| virtual std::auto_ptr < MAKVRinTerra::DtAreaFeatureSet > | LOSfeatures () const |
| Returns a DtAreaFeatureSet configured for line of sight blocking features. | |
| virtual std::auto_ptr < MAKVRinTerra::DtPathFeatureSet > | paths (const std::string &type) const |
| virtual std::auto_ptr < MAKVRinTerra::DtFeatureSet > | features (const std::string &queryName) const |
| Access filtered features. | |
| virtual std::auto_ptr < MAKVRinTerra::DtFeatureSet > | allFeatures () const |
| Access all features. | |
| virtual std::auto_ptr < MAKVRinTerra::DtFeatureSet > | featuresRaw (const std::string &queryName) const |
| Access all features. | |
| virtual std::auto_ptr < MAKVRinTerra::DtFeatureSet > | allFeaturesRaw () const |
| Access all features directly from the source. | |
| 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 void | forceLoadTerrainAreas (const DtTerrainPagingGeometryList &forceLoadGeometry) |
| Functions like preloadTerrainAreas except the geometries are saved and will be kept loaded. | |
| virtual bool | dataAvailable (const DtTerrainPagingGeometryList &geometry) |
| Returns true if all of the terrain which intersects the geometry list is paged in. | |
| virtual const DtTerrainCapabilities * | terrainCapabilities () const |
| virtual bool | addTerrainPassThroughLayer (const DtString &layerType) |
| Adds a pass though layer registered with the specified type to the currently loaded terrain implementation. | |
| virtual void | setIntersectDataLoadExpireTime (const double &expireTime) |
| Set the default expiration time for data load requests generated by intersect calls that require data that has not been loaded (paged-in). | |
| virtual void | expireDataLoadRequestsBeforeTime (const double ¤tTime) |
| virtual void | trianglesInArea (DtTriangleCallbackFcn func, DtTriangleCallbackFinalizeFcn finalize, DtTerrainProcessPolygonsBox &box, void *usr) const |
| Calls the function in the first argument on each triangle in the area specified by the box. | |
| virtual void | trianglesInArea (DtTriangleOutputInterface &func, DtTerrainProcessPolygonsBox &box) const |
| Calls the object in the first argument on each triangle in the area specified by the box. | |
| virtual boost::shared_ptr < DtAsyncJobMapEntry > | makePathAsync (const DtPoint &localStart, const DtPoint &localDestination, const std::string &type, const double &maxSearchRadius, const double &startProximityThreshold, const DtAStarGraph::DtWeightFactorsList &weightFactors=DtAStarGraph::DtWeightFactorsList()) |
| Register asynchronous path finding task. | |
| virtual DtAStarGraph::Path | makePath (const DtPoint &localStart, const DtPoint &localDestination, const std::string &type, const double &maxSearchRadius, const double &startProximityThreshold, boost::function< bool()> cancelCheck, const DtAStarGraph::DtWeightFactorsList &weightFactors=DtAStarGraph::DtWeightFactorsList()) const |
| Make a path from start to destination on features configured using the provided type. | |
| virtual bool | onPathFeature (const DtPoint &location, const DtString &type, double buffer=0.5) |
| returns whether the given point is within "offset" distance of any edge on the path graph. | |
| virtual DtAStarGraph::Ptr | pathFinder (const std::string &) const |
| Return the DtAStarGraph object for the given feature type. | |
| virtual boost::shared_ptr < DtAsyncJobMapEntry > | addAsyncJob (DtAsyncJob *job) |
| Add an user defined async job type to the job queue. | |
| MAKVRinTerra::DtProj::CPtr | localProj () const |
| Returns the local DtProj object for the current terrain. | |
| MAKVRinTerra::DtFeaturesDebugger & | debugger () const |
| MAKVRinTerra::DtQuery | findQuery (const std::string &name) const |
| const double | topoDistance (const DtPoint &start, const DtPoint &end, const MAKVRinTerra::DtProj &localProj) |
| MAKVRinTerra::DtClosestPathFeatureFinder | closestFeatureOnNetwork (const std::string &type, const DtPoint &startingLocation, const double &searchRadius, bool *dataAvailable=NULL) |
| Finds the closest feature on the feature network to startingLocation. | |
| void | breakUpChord (const MAKVRinTerra::DtProj &, const DtChord &chord, std::vector< DtChord > &chords) const |
| void | breakUpChord (const DtChord &chord, std::vector< DtChord > &chords) const |
| virtual DtTerrainGeometryHandle * | createEntityGeometry (const DtFilename &file) |
| Create geometry in the terrain which represents the entity. | |
| virtual DtDynamicTerrainRequestHandle | addDynamicTerrainChangeRequest (double time, const std::map< DtString, DtString > &keyValueChanges, const DtVector ¢erLocation, double radius) |
| Add a dynamic terrain change request defined by a spherical geometry to the system. | |
| virtual DtDynamicTerrainRequestHandle | addDynamicTerrainChangeRequest (double time, const std::map< DtString, DtString > &keyValueChanges, const std::list< DtVector > &vertices, double width) |
| Add a dynamic terrain change request defined by a linear geometry to the system. | |
| virtual DtDynamicTerrainRequestHandle | addDynamicTerrainChangeRequest (double time, const std::map< DtString, DtString > &keyValueChanges, const std::list< DtVector > &vertices) |
| Add a dynamic terrain change request defined by a polygonal geometry to the system. | |
| virtual DtDynamicTerrainRequestHandle | addDynamicTerrainChangeRequest (double time, makVrv::DtDynamicTerrainChange *command) |
| Add a dynamic terrain change request to the system. | |
| virtual void | dynamicTerrainFeaturesInArea (const DtVector ¢erLocation, double radius, std::list< DtRwDynamicTerrainInformation > &dynamicTerrainInfo, bool *dataAvailable=NULL, const DtString &filterKey=DtString::nullString()) |
| Gets the list of all dynamic terrain features and potential values in the given spherical geometry. | |
| virtual void | dynamicTerrainFeaturesInArea (const std::list< DtVector > &vertices, double width, std::list< DtRwDynamicTerrainInformation > &dynamicTerrainInfo, bool *dataAvailable=NULL, const DtString &filterKey=DtString::nullString()) |
| Gets the list of all dynamic terrain features and potential values in the given linear geometry. | |
| virtual void | dynamicTerrainFeaturesInArea (const std::list< DtVector > &vertices, std::list< DtRwDynamicTerrainInformation > &dynamicTerrainInfo, bool *dataAvailable=NULL, const DtString &filterKey=DtString::nullString()) |
| Gets the list of all dynamic terrain features and potential values in the given polygonal geometry. | |
| virtual bool | extractDynamicTerrainFeatureInformation (const makVrv::DtDynamicTerrainFeature &feature, DtRwDynamicTerrainInformation &dynamicTerrainInfo, const DtString &filterKey=DtString::nullString()) const |
| Extracts information out of a makVrv::DtDynamicTerrainFeature and stores in DtRwDynamicTerrainInformation. | |
| virtual DtDynamicTerrainQueryHandle | queryDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false) |
| Install a query which will call the supplied callback on matching dynamic terrain features as they are paged in. | |
| virtual void | queryCurrentDynamicTerrainFeatures (const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false) |
| virtual void | cacheInformationForTerrainArea (unsigned minLOD, unsigned maxLOD, const DtExtent &cacheArea, double &estimatedTime, double &estimatedSize, std::vector< std::string > &elevationLayers, std::vector< std::string > &modelLayers, std::vector< std::string > &featureLayers) const |
| Returns information about what terrain data the sim can cache. | |
| virtual void | cacheTerrainArea (int requestId, unsigned minLOD, unsigned maxLOD, const DtExtent &cacheArea, DtCacheProgressCallbackFunction fcn=0, void *usr=0) |
| Call this to start the process of caching terain data (if supported for the open terrain) using the given request id and extent. | |
| virtual void | cancelCacheTerrainArea (int requestId) |
| Call this routine to cancel a potential cache in progress. | |
| virtual void | writeTerrainIndex (const DtString &name=DtString()) |
| Create terrain index. | |
| virtual bool | oceanLayerPresent () const |
| Returns whether or not an ocean layer is present in this terrain. | |
| virtual void | setOceanLayerPresent (bool b) |
| Sets whether or not the ocean layer is present in this terrain. | |
| virtual bool | nonPolygonalWaterHeight (const DtChord &localLocation, double &height) const |
| Function to return the water level defined for water regions that aren't defined with surface water polygons. | |
| virtual void | setNonPolygonalWaterHeight (double d) |
| Sets the non polygonal water height to use as referenced in nonPolygonalWaterHeight. | |
| virtual double | defaultWaterDepth (const DtVector &localLocation) const |
| Defines the default water depth when floor and surface levels are not defined in the database. | |
| virtual void | setDefaultWaterDepth (double) |
| Sets the default water depth. | |
| virtual double | defaultSurfaceElevation (const DtVector &localLocation) const |
| Defines the elevation of the terrain surface when there is no data. | |
| virtual DtSurface::DtMedium | mediumForUnspecPolygonsUnderWater () const |
| Defines what to do in terrainHeightUnderWater when a polygon with medium "unspecified" is encountered below a water surface. | |
| virtual void | setMediumForUnspecPolygonsUnderWater (DtSurface::DtMedium m) |
| Sets the medium for mediumForUnspecPolygonsUnderWater. | |
| virtual double | landAboveWaterMinimumSeparation () const |
| This function returns a constant threshold value that determines how far an unspecified-medium polygon has to be above a water surface for it to be considered above-sea-level land. | |
| virtual void | setLandAboveWaterMinimumSeparation (double) |
| Sets landAboveWaterMinimumSeparation. | |
| virtual double | terrainHeightAboveSeaLevel (const DtPoint &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Returns the height above sea level for the topmost terrain intersection at databaseLocation. | |
| virtual double | terrainHeightAboveSeaLevel (DtTerrainIntersectStatus &status, const DtPoint &databaseLocation, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | terrainHeightAndIntersection (const DtVector &localLocation, double &height, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Returns whether there is a terrain intersection and if so sets height and record from the topmost terrain intersection point. | |
| virtual bool | terrainHeightAndIntersection (DtTerrainIntersectStatus &status, const DtVector &localLocation, double &height, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | terrainHeightAndIntersectionBelow (const DtVector &localLocation, double &height, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Like terrainHeightAndIntersection(), but only looks for intersections below the given local location. | |
| virtual bool | terrainHeightAndIntersectionBelow (DtTerrainIntersectStatus &status, const DtVector &localLocation, double &height, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | terrainHeightUnderWater (const DtVector &databaseLocation, double &groundHeight, DtSurface &groundSurface, DtVector &groundNormal, double &waterHeight, DtSurface::DtMedium &topSurfaceMedium, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) |
| This function gets the ground and water (if it exists) surfaces at the given location. | |
| virtual bool | terrainHeightUnderWater (DtTerrainIntersectStatus &status, const DtVector &databaseLocation, double &groundHeight, DtSurface &groundSurface, DtVector &groundNormal, double &waterHeight, DtSurface::DtMedium &topSurfaceMedium, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) |
| virtual bool | closestIntersection (const DtVector &localLocation, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false, bool doNotAddDefaultRecord=false, int flags=0) const |
| Similar to the terrainHeight functions above. | |
| virtual bool | closestIntersection (DtTerrainIntersectStatus &status, const DtVector &localLocation, DtPoint &intersectionPoint, bool doNotAddDefaultRecord=false, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | closestIntersection (double lat, double lon, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false, bool doNotAddDefaultRecord=false, int flags=0) const |
| Same as above function, but accepts location in lat/lon. | |
| virtual bool | closestIntersection (DtTerrainIntersectStatus &status, double lat, double lon, DtPoint &intersectionPoint, bool doNotAddDefaultRecord=false, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | closestIntersection (const DtVector &localLocation, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, bool doNotAddDefaultRecord=false, int flags=0) const |
| Same as above function, but returns the entire intersection record, and not just the intersection point. | |
| virtual bool | closestIntersection (DtTerrainIntersectStatus &status, const DtVector &localLocation, DtVrfChordIntersectionRecord &record, bool doNotAddDefaultRecord=false, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | closestIntersection (double lat, double lon, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, bool doNotAddDefaultRecord=false, int flags=0) const |
| Same as above function, but accepts location in lat/lon. | |
| virtual bool | closestIntersection (DtTerrainIntersectStatus &status, double lat, double lon, DtVrfChordIntersectionRecord &record, bool doNotAddDefaultRecord=false, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | closestIntersection (const std::list< DtVector > &localLocationList, DtVrfChordIntersectRecordList &recordList, int &numIntersections, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, bool doNotAddDefaultRecord=false, int flags=0) const |
| Returns complete intersection information about the closest terrain intersection point for each location in the list in Database Coordinates. | |
| virtual bool | closestIntersection (DtTerrainIntersectStatus &status, const std::list< DtVector > &localLocationList, DtVrfChordIntersectRecordList &recordList, int &numIntersections, bool doNotAddDefaultRecord=false, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | intersect (const DtChord &chord, DtPoint &intersectionPoint, double &intersectionTime, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Calculates the first terrain intersection point along a chord given in Database Coordinates. | |
| virtual bool | intersect (DtTerrainIntersectStatus &status, const DtChord &chord, DtPoint &intersectionPoint, double &intersectionTime, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | intersect (const DtChord &chord, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Returns complete intersection information about the first terrain intersection point along a chord given in Database Coordinates. | |
| virtual bool | intersect (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | allIntersectsAlongChord (const DtChord &chord, DtVrfChordIntersectRecordList &intList, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Computes the list of all intersections of a chord (in Database Coordinates) with the terrain database. | |
| virtual bool | allIntersectsAlongChord (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | allIntersectsAlongChordDebug (const DtChord &chord, DtVrfChordIntersectRecordList &intList, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Same as allIntersectsAlongChord, but prints debug info about all surfaces found. | |
| virtual bool | allIntersectsAlongChordDebug (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual bool | intersectList (const std::list< DtChord > &chordList, DtVrfChordIntersectRecordList &recordList, int &numTerrainIntersections, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false, int flags=0) const |
| Returns complete intersection information about the first terrain intersection points along each of a list of DtChords given in Database Coordinates. | |
| virtual bool | intersectList (DtTerrainIntersectStatus &status, const std::list< DtChord > &chordList, DtVrfChordIntersectRecordList &recordList, int &numTerrainIntersections, const DtTerrainIntersectOptions &options=DtTerrainIntersectOptions()) const |
| virtual void | setAssertOnBlockingTerrainCalls (bool assertBlock) |
| Determines if an exception should be thrown if a blocking terrain call is made. | |
| virtual bool | assertOnBlockingTerrainCalls () const |
| virtual void | setWarnOnBlockingTerrainCalls (bool warnBlock) |
| Determines if a warning should be printed out if a blocking terrain call is made. | |
| virtual bool | warnOnBlockingTerrainCalls () const |
Protected Types | |
| typedef std::map< DtString, DtGenericTerrainRecordCallbackListPtr > | DtGenericTerrainRecordCallbackListMap |
| typedef boost::ptr_list < MAKVRinTerra::DtFeatureSet > | FeatureSetList |
Protected Member Functions | |
| void | insertNonPolyWaterIntoIntersectionList (DtVrfChordIntersectionRecord &waterInterx, DtVrfChordIntersectRecordList &intrxList) const |
| Insert the given intersection record into the intersection list based on intersection time order. | |
| virtual DtVrfChordIntersectionRecord | blankSurfaceIntersectionRecord (const DtVector &localLocation, const double height) const |
| Creates a chord intersection record corresponding to a surface with unspecified soil type (and medium). | |
| virtual bool | nonPolygonalWaterIntersect (const DtChord &chord, DtVrfChordIntersectRecordList &waterRecords, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA) const |
| If there is non-polygonal water, this function computes the intersection records for the chord with this water. | |
| virtual DtGenericTerrainRecordCallbackListPtr | findOrAddCallbackList (DtGenericTerrainRecordCallbackListMap &map, const DtString &recordType) |
| Finds recordType in the specified map. | |
Static Protected Attributes | |
| static double | theTerrainPagingMaxHeight |
DtTerrainInterface allows access to common terrain calls without having to know the terrain implementation.
Additional terrain implementations can be added as well.
The terrain intersection functions (which do not include the DtTerrainIntersectOptions parameter) in this class will by default block if the requested data needs to be paged in. In general making a blocking call from any tick-based function will cause a long delay resulting in a long frame which will most likely cause very undesirable effects on the simulation. In order to make an asynchronous call a bool pointer called "dataAvailable" must be specified. If the data for the requested location(s) has already been paged in and the result is immediately available, dataAvailble will be set to true and the results returned will reflect the contents of the terrain database. Otherwise, the terrain intersection call will cause the terrain implementation to queue the loading of the corresponding terrain page and the call will return immediately and set dataAvailable to false. In this case, the return value of the function should not be used and it does not reflect the terrain database. For most terrain implementations the cost of making terrain intersections on unavailable databases pages should be minimal and its expected that callers can poll for the data by making repeated intersection calls.
See DtTerrainIntersectOptions and DtTerrainIntersectStatus for information on how calls using these parameters work.
|
protected |
|
protected |
| DtTerrainInterface::DtTerrainInterface | ( | ) |
Constructor.
|
virtual |
Destructor.
Virtual initialization.
Call this after construction, and before calling any other members on the class. Creates the terrain implementation manager
|
virtual |
Set the config file which will attempt to be loaded during init.
|
virtual |
Current config options.
|
virtual |
Cleans up finished async server jobs, and checks for path finder removal.
|
virtual |
Returns true if this terrain is the same terrain as is currently open.
|
inline |
Returns the current terrain implementation.
|
virtual |
Add a terrain implementation type to the set of terrain implementations that can be used by this interface.
|
virtual |
Add a feature layer that will be added to the feature database.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Settings will be merged into existing – not replace.
| block | whether this function should block until all resources are cleaned up |
|
virtual |
Loads a model from the specified file.
This is different from loadTerrain in that, if the implementation supports it, will not load this file into the main terrain, but rather will create a separate database that contains just this model. Supply option entity for for use by implementation to mutate loaded model based on appearance. If hasOceanLayer is false, the configuration of the terrain implementation will be changed to disable the ocean layer.
|
virtual |
If supported by the interface, return the height difference from the currently loaded model as a transition from the old appearance to the new appearance.
|
virtual |
Creates a terrain from the given extent.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns a DtAreaFeatureSet configured using the provided type.
See appData/settings/featureconfig.txt for types.
|
virtual |
Returns a DtAreaFeatureSet configured using the provided type and parameters.
See appData/settings/featureconfig.txt for types.
|
virtual |
Returns a DtAreaFeatureSet configured for line of sight blocking features.
|
virtual |
|
virtual |
Access filtered features.
| queryName | Name of config query identifying features which will be returned. |
|
virtual |
Access all features.
|
virtual |
Access all features.
Features will be read directly from the source
|
virtual |
Access all features directly from the source.
|
virtual |
Returns the height above sea level for the topmost terrain intersection at databaseLocation.
| Input | |
| databaseLocation | the location to test |
| options | See DtTerrainIntersectOptions |
| Output | |
| status | See DtTerrainIntersectStatus |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false and zero will be returned. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
|
virtual |
|
virtual |
Returns whether there is a terrain intersection and if so sets height and record from the topmost terrain intersection point.
| Input | |
| options | See DtTerrainIntersectOptions |
| localLocation | the location to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| status | See DtTerrainIntersectStatus |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, height will be set to zero, and the record will not reflect any results. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | a terrain intersection was found |
| false | if dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Like terrainHeightAndIntersection(), but only looks for intersections below the given local location.
|
virtual |
|
virtual |
This function gets the ground and water (if it exists) surfaces at the given location.
It provides the ground height, the surface structure for the ground, the normal of that surface, the height of the water surface, and a flag indicating whether there is actually water.
This function may find one or more surfaces, which may be labeled as ground, water, or unspecified. The database may have a global sea level altitude specified, and may have a default ocean depth specified. The function interprets different combinations of data as follows:
| databaseLocation | The only input to the function; the location to be tested, in database coordinates. |
| groundHeight | The altitude of the ground at the location, either under a water surface or as the top surface. |
| groundSurface | The surface (structure) of the ground (either the top surface if it is ground, or the sea bottom if the top is water). |
| waterHeight | The altitude of the water surface at the location. NOT VALID IF TOP SURFACE IS GROUND. |
| topSurfaceMedium | The medium (see surface.h) of the top surface. This returns one of three values: Ground, WaterSurface, or UnspecifiedMedium. If Ground, then the waterHeight parameter is not meaningful. Ground is returned if the medium is Ground, Above Ground, Below Ground, Above Water, or Under Water. If UnspecifiedMedium, then the calling code can interpret this as it needs to. For example, if this function finds only an unspecified surface, it will return its height in waterHeight as if it were water, and synthesize a bottom surface for groundHeight. The calling code could choose to treat the unspecified surface as ground though. Note that the algorithm treats a surface as Unspecified if the soil type is Unspecified, no medium bits are set, or the medium water-surface bit is set AND some other medium bit is set. |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the terrain data is not yet paged in, dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| options | See DtTerrainIntersectOptions |
| status | See DtTerrainIntersectStatus |
| true | All source terrain was available, so the output parameter values are valid. Note that the query may be outside the region of source data, but the function will still return true, with default values in the parameters. |
| false | If some source data for the location was not yet available, i.e. not paged in. |
|
virtual |
|
virtual |
Similar to the terrainHeight functions above.
Function to determine the closest intersection to a specified location, either in local (DB) coordinates or in lat/lon. The closest intersection is defined as the closest intersection in the down or up direction from location. Thus if there are multiple terrain levels, it will not necessarily return an intersection with the topmost as the terrainHeight functions do.
Return Values: True if any intersection, vector data or terrain, is found. If a vector data intersection is found, then the vecNetworkIntersectionRecord is set appropriately. If at least one terrain intersection is found, the intersectionPoint parameter is set to the closest intersection point.
| Input | |
| options | See DtTerrainIntersectOptions |
| localLocation | the location to test |
| Output | |
| status | See DtTerrainIntersectStatus |
| intersectionPoint | the point of intersection, left unchanged if dataAvailable is set to false. |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, intersectionPoint will not be modified and false will be returned. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| doNotAddDefaultRecord | the closest intersection, when all else fails, will add a default record at the location. Set this flag to true to not add a record and return false |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | a terrain intersection was found |
| false | if dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Same as above function, but accepts location in lat/lon.
| Input | |
| options | See DtTerrainIntersectOptions |
| lat | the latitude to test |
| lon | the longitude to test |
| Output | |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, intersectionPoint will not be modified and false will be returned. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| true | a terrain intersection was found |
| false | if dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Same as above function, but returns the entire intersection record, and not just the intersection point.
| Input | |
| options | See DtTerrainIntersectOptions |
| localLocation | the location to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| status | See DtTerrainIntersectStatus |
| record | the result of the terrain intersection |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, record will not be modified and false will be returned. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| doNotAddDefaultRecord | the closest intersection, when all else fails, will add a default record at the location. Set this flag to true to not add a record and return false |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | a terrain intersection was found |
| false | if dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Same as above function, but accepts location in lat/lon.
| Input | |
| options | See DtTerrainIntersectOptions |
| lat | the latitude to test |
| lon | the longitude to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| status | See DtTerrainIntersectStatus |
| record | the result of the terrain intersection |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, intersectionPoint will not be modified and false will be returned. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| doNotAddDefaultRecord | the closest intersection, when all else fails, will add a default record at the location. Set this flag to true to not add a record and return false |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | a terrain intersection was found |
| false | if dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Returns complete intersection information about the closest terrain intersection point for each location in the list in Database Coordinates.
| Input | |
| options | See DtTerrainIntersectOptions |
| localLocationList | list of locations to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| status | See DtTerrainIntersectStatus |
| recordList | a DtVrfChordIntersectionRecordList (one record for each localLocation). |
| numIntersections | set to the number of intersections that occur for the list of locations. |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, recordList will not represent any intersections and numIntersections will be set to 0. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| doNotAddDefaultRecord | the closest intersection, when all else fails, will add a default record at the location. Set this flag to true to not add a record and return false |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | any chord intersects the terrain |
| false | if dataAvailable was specified and returns true, then none of the chords intersect the terrain. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Calculates the first terrain intersection point along a chord given in Database Coordinates.
| Input | |
| options | See DtTerrainIntersectOptions |
| chord | the chord to test |
| Output | |
| status | See DtTerrainIntersectStatus |
| intersectionPoint | location of the intersection or left unchanged if there's no intersection or the data is not yet available (see dataAvailable). |
| intersectionTime | time of the intersection along the input chord or left unchanged if there's no intersection or the data is not yet available (see dataAvailable). |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, and intersectionPoint and intersectionTime will be left unchanged. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | if the chord intersects the terrain |
| false | if dataAvailable was specified and returns true, then the chord does not intersect the terrain. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Returns complete intersection information about the first terrain intersection point along a chord given in Database Coordinates.
The irtFlag value specifies which data should be calculated and returned for each intersection point.
| Input | |
| options | See DtTerrainIntersectOptions |
| chord | the chord to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| status | See DtTerrainIntersectStatus |
| record | the result of the terrain intersection. Not filled in if dataAvailable is false, unless the chord hit global water, in which case it will contain water surface data. |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, record will not reflect any terrain intersections (except possibly global water). |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true– | if the chord intersects the terrain. The function will return true if dataAvailable is false but the chord hits global water. |
| false– | if dataAvailable was specified and returns true, then a false return means that the chord does not intersect any terrain. If dataAvailable is false, then a false value just confirms that no terrain data was available. |
|
virtual |
|
virtual |
Computes the list of all intersections of a chord (in Database Coordinates) with the terrain database.
| Input | |
| options | See DtTerrainIntersectOptions |
| chord | the chord to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| status | See DtTerrainIntersectStatus |
| intList | the result of the terrain intersection |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false and intList will not reflect any terrain intersections |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | if the chord intersects the terrain |
| false | if dataAvailable was specified and returns true, then the chord does not intersect the terrain. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
virtual |
Same as allIntersectsAlongChord, but prints debug info about all surfaces found.
Prints to sim console at "warn" notify level. Always gets all data from intersections.
|
virtual |
|
virtual |
Returns complete intersection information about the first terrain intersection points along each of a list of DtChords given in Database Coordinates.
The returned record list is a DtVrfChordIntersectionRecordList (one record for each chord).
| Input | |
| options | See DtTerrainIntersectOptions |
| chordList | the chords to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| status | See DtTerrainIntersectStatus |
| numTerrainIntersections | number of chords that intersected with the terrain |
| numVectorNetworkIntersections | number of chords that intersected with the vector network |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false, numTerrainIntersections and numVectorNetworkIntersections will be set to zero and the recordList will not reflect any intersections. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| flags | optional flags to pass into the intersector. The flags are implementation dependent |
| true | if any chord intersected the terrain (or vector network if specified) |
| false | if dataAvailable was specified and returns true, then the chord does not intersect the terrain. Otherwise false indicates that the data is not yet available. |
|
virtual |
|
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. |
|
virtual |
Functions like preloadTerrainAreas except the geometries are saved and will be kept loaded.
Use this function when you want to pin terrain areas in memory. Only the set of geometries from the last call to this function will be saved. This command is not thread safe.
|
virtual |
Returns true if all of the terrain which intersects the geometry list is paged in.
|
virtual |
Adds a pass though layer registered with the specified type to the currently loaded terrain implementation.
This is typically a debugging or analysis activity.
|
virtual |
Determines if an exception should be thrown if a blocking terrain call is made.
This can help to track down blocking terrain calls which are causing problems with a running simulation. Note that calling the blocking form of any terrain intersection function will cause an assertion; it is not necessary for the call to actually block and even non-paging implementations will assert. This is done to make it easier to find potential problems regardless of the particular terrain or location being used.
|
virtual |
|
virtual |
Determines if a warning should be printed out if a blocking terrain call is made.
|
virtual |
|
virtual |
Set the default expiration time for data load requests generated by intersect calls that require data that has not been loaded (paged-in).
| expireTime | The expiration time to be assigned to data load requests generated by intersect calls on the terrain implementation. |
|
virtual |
|
virtual |
Calls the function in the first argument on each triangle in the area specified by the box.
Once all of the triangles have been processed, it calls the finalize function to signify it has completed.
| func | Function that will handle a single terrain triangle |
| finalize | Function that will handle when this function is completed |
| box | The area (in local coordinates) in which to get terrain triangles from |
| usr | The object that owns both the first and second argument of this function |
|
virtual |
Calls the object in the first argument on each triangle in the area specified by the box.
Once all of the triangles have been processed, it calls the finalize function to signify it has completed.
| func | User supplied interface to triangle output. |
| box | The area (in local coordinates) in which to get terrain triangles from |
|
virtual |
Register asynchronous path finding task.
Once token's status is "complete", result can be used. See makePath.
|
virtual |
Make a path from start to destination on features configured using the provided type.
See appData/settings/featureconfig.txt for types. Note that this function may take a long time to return. To calculate a path in another thread see makePathAsync. Do not call this function in the main thread.
| localStart | Start point in local |
| localDestination | Destination point in local |
| type | Type of features to path plan on, for example "MAK_ROAD" |
| maxSearchradius | A vertex more than this distance from the destination will not cause more feature data to be paged in. |
| cancelCheck | A function that returns true when the task should be canceled. |
| weightFactors | List of modifications to edge weights based on DtQueries |
|
virtual |
returns whether the given point is within "offset" distance of any edge on the path graph.
|
virtual |
Return the DtAStarGraph object for the given feature type.
|
virtual |
Add an user defined async job type to the job queue.
| job | Pointer to job object, should be initialized with operator new (tbb::task::allocate_root()). |
| MAKVRinTerra::DtProj::CPtr DtTerrainInterface::localProj | ( | ) | const |
Returns the local DtProj object for the current terrain.
| MAKVRinTerra::DtFeaturesDebugger& DtTerrainInterface::debugger | ( | ) | const |
| MAKVRinTerra::DtQuery DtTerrainInterface::findQuery | ( | const std::string & | name | ) | const |
| const double DtTerrainInterface::topoDistance | ( | const DtPoint & | start, |
| const DtPoint & | end, | ||
| const MAKVRinTerra::DtProj & | localProj | ||
| ) |
| MAKVRinTerra::DtClosestPathFeatureFinder DtTerrainInterface::closestFeatureOnNetwork | ( | const std::string & | type, |
| const DtPoint & | startingLocation, | ||
| const double & | searchRadius, | ||
| bool * | dataAvailable = NULL |
||
| ) |
Finds the closest feature on the feature network to startingLocation.
Returns false if no features are found.
| startingLocation | location in local to which the closest feature on the feature network is found. |
| searchRadius | The radius used to load in features |
| dataAvailable | If NULL, function will block for up to 20 seconds, and return false if the data is not loaded. Otherwise, being feature loading, but do not block. If the features are not fully loaded, it will find the closest feature using whichever features are loaded. |
| void DtTerrainInterface::breakUpChord | ( | const MAKVRinTerra::DtProj & | , |
| const DtChord & | chord, | ||
| std::vector< DtChord > & | chords | ||
| ) | const |
| void DtTerrainInterface::breakUpChord | ( | const DtChord & | chord, |
| std::vector< DtChord > & | chords | ||
| ) | const |
|
virtual |
Create geometry in the terrain which represents the entity.
|
virtual |
Add a dynamic terrain change request defined by a spherical geometry to the system.
| time | Time at which this request takes place. |
| keyValueChanges | Key/value pairs that define what changes should be made. |
| centerLocation | Center, in local coordinates, of the spherical area being changed. |
| radius | Radius of the spherical area being changed. |
| Handle | object for removing this request. |
|
virtual |
Add a dynamic terrain change request defined by a linear geometry to the system.
| time | Time at which this request takes place. |
| keyValueChanges | Key/value pairs that define what changes should be made. |
| vertices | Vertices of the line, in local coordinates. |
| width | Width of the line. |
| Handle | object for removing this request. |
|
virtual |
Add a dynamic terrain change request defined by a polygonal geometry to the system.
| time | Time at which this request takes place. |
| keyValueChanges | Key/value pairs that define what changes should be made. |
| vertices | Vertices of the closed area, in local coordinates. |
| Handle | object for removing this request. |
|
virtual |
Add a dynamic terrain change request to the system.
| time | Time at which this request takes place. |
| command | Command which describes this change. Takes ownership. |
| geometry | Only change features which match this geometry. Takes ownership. |
| Handle | object for removing this request. |
|
virtual |
Gets the list of all dynamic terrain features and potential values in the given spherical geometry.
| centerLocation | Center, in local coordinates, of the spherical area being queried. |
| radius | Radius of the spherical area being queried. |
| dynamicTerrainInfo | The result of this query, a list of potential dynamic terrain changes in the designated area. |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false and dynamicTerrainInfo will not reflect any terrain intersections |
| filterKey | If not empty, specifies a specific key of interest. Only dynamic terrain changes with this key will be returned. |
|
virtual |
Gets the list of all dynamic terrain features and potential values in the given linear geometry.
| vertices | Vertices of the line, in local coordinates. |
| width | Width of the line. |
| dynamicTerrainInfo | The result of this query, a list of potential dynamic terrain changes in the designated area. |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false and dynamicTerrainInfo will not reflect any terrain intersections |
| filterKey | If not empty, specifies a specific key of interest. Only dynamic terrain changes with this key will be returned. |
|
virtual |
Gets the list of all dynamic terrain features and potential values in the given polygonal geometry.
| vertices | Vertices of the closed area, in local coordinates. |
| dynamicTerrainInfo | The result of this query, a list of potential dynamic terrain changes in the designated area. |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false and dynamicTerrainInfo will not reflect any terrain intersections |
| filterKey | If not empty, specifies a specific key of interest. Only dynamic terrain changes with this key will be returned. |
|
virtual |
Extracts information out of a makVrv::DtDynamicTerrainFeature and stores in DtRwDynamicTerrainInformation.
| feature | The dynamic terrain feature whose information we want to extract. |
| dynamicTerrainInfo | The result of this operation, extracted information about this feature. |
| filterKey | If not empty, specifies a specific key of interest. Only if the dynamic terrain feature contains this key will be it processed. |
| True | if the information was successfully extracted, false if the operation failed or the feature did not contain the filterKey. |
|
virtual |
Install a query which will call the supplied callback on matching dynamic terrain features as they are paged in.
Callbacks can then be installed on the feature itself to monitor it for changes and page out.
|
virtual |
|
virtual |
Returns information about what terrain data the sim can cache.
|
virtual |
Call this to start the process of caching terain data (if supported for the open terrain) using the given request id and extent.
Note that the extent coordinates are in lat/lon degrees (not radians). The callback is given to give progress on the load
|
virtual |
Call this routine to cancel a potential cache in progress.
Create terrain index.
| name | Name of index to create (i.e. name tag in earth file elevation layer). If name is empty then all indices will be created. This function throws exceptions on errors. |
|
virtual |
Returns whether or not an ocean layer is present in this terrain.
|
virtual |
Sets whether or not the ocean layer is present in this terrain.
|
virtual |
Function to return the water level defined for water regions that aren't defined with surface water polygons.
If this database has water defined this way, terrainCapabilities()->hasNonPolygonalWaterRegions() will return true.
| localLocation | Location of intersection. |
| Height | The height of the water is returned in the height parameter. |
| True | If there is non-polygonal water at this location. |
| False | If there is no non-polygonal water at this location. |
|
virtual |
Sets the non polygonal water height to use as referenced in nonPolygonalWaterHeight.
|
virtual |
Defines the default water depth when floor and surface levels are not defined in the database.
The location argument is provided for future extension.
|
virtual |
Sets the default water depth.
|
virtual |
Defines the elevation of the terrain surface when there is no data.
The location argument is provided for future extension. This returns seaLevel (as in nonPolygonalWaterHeight). Override this method to return a different value.
|
virtual |
Defines what to do in terrainHeightUnderWater when a polygon with medium "unspecified" is encountered below a water surface.
If a database uses "unspecified" for all ground and water surfaces, then it is appropriate for this function to return WaterSurface. I.e. the unspecified polygons below non-poly water are redundant and ignored. (Unspecified polygons above water are still treated as ground; "above" means landAboveWaterMinimumSeparation() above the water surface.)
However, if a database uses "unspecified" for ground polygons, including the sea floor, then this function should return a Ground, signifying that the unspecified polygons below water are ground.
|
virtual |
Sets the medium for mediumForUnspecPolygonsUnderWater.
|
virtual |
This function returns a constant threshold value that determines how far an unspecified-medium polygon has to be above a water surface for it to be considered above-sea-level land.
If the unspecified polygon is below this threshold, it is considered "below" and will be classified according to mediumForUnspecPolygonsUnderWater().
This value could be very tiny, but on a curved-earth terrain with unspecified-medium polygons being used (redundantly) as the sea surface, e.g. alongside non-polygonal sea-level data, the polygons will be tangent to the curved earth and may stick up above sea level at their edges.
|
virtual |
|
protected |
Insert the given intersection record into the intersection list based on intersection time order.
|
protectedvirtual |
Creates a chord intersection record corresponding to a surface with unspecified soil type (and medium).
This is used in terrainHeightAndIntersection and closestIntersection. The surface intersection is set at a point on a vertical line through the localLocation, at the given altitude. The normal of the surface is set to point up. The "time" in the intersection record is set to 0.5.
|
protectedvirtual |
If there is non-polygonal water, this function computes the intersection records for the chord with this water.
The chord is in local (database) coordinates.
|
protectedvirtual |
Finds recordType in the specified map.
If found, returns the associated list. If not found, adds a new empty list to the map and returns that list.
|
protected |
Default config loaded in init Loading terrains will have a copy of this and may set their own specific values internally, and these will be active for the duration it is loaded.
A new terrain would use the original values in these variables though.
|
protected |
|
protected |
|
protected |
|
protected |
Status publisher needs to keep track of when terrain is loaded and unloaded.
|
protected |
|
protected |
|
protected |
The last filename that was passed to loadTerrain()
|
protected |
|
protected |
|
protected |
Needed in case file is saved with same name and then reloaded.
|
staticprotected |
|
protected |
|
protected |
Manages asynchronous path planning tasks.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |