![]() |
VR-Forces 4.7 Class Documentation
|
DtTerrainSourcePager is the base class for terrain pagers. More...

Classes | |
| class | TerrainRecord |
Public Member Functions | |
| DtTerrainSourcePager (DtVantageTerrainEngine *terrainEngine) | |
| Constructor. | |
| virtual | ~DtTerrainSourcePager () |
| Destructor. Deletes all pending commands and myTerrainSourceTracker. | |
| virtual bool | init () |
| Called after pager is configured. | |
| virtual void | tick () |
| Processes commands from the priority-sorted command map. | |
| virtual DtTerrainSourceTracker * | createTerrainSourceTracker (DtVantageTerrainEngine *)=0 |
| Creates and returns a DtTerrainSourceTracker. | |
| virtual DtTerrainSourceTracker * | terrainSourceTracker () |
| Accessor for myTerrainSourceTracker. | |
| virtual void | updatePageTracker (DtTerrainIntersectIDType intersectId=0)=0 |
| virtual int | highestPriorityPendingWork () |
| Calls processCommandQueue to add new commands into the priority-sorted command map. | |
| virtual void | processCommandQueue () |
| Takes incoming commands off the command queue and adds them to the priority-sorted command map. | |
| virtual void | setCurrentTime (const double ¤tTime) |
| Sets myCurrentTime for purposes of expiring old page-in commands. | |
| virtual unsigned long | numTriangles () const |
| Number of triangles paged in to this pager. | |
| virtual bool | quitFlagSet () const |
| virtual void | setQuit (bool) |
| virtual const Coordinate_System * | localCS () const |
| virtual void | setLabel (const DtString &) |
| virtual DtString | label () const |
Public Member Functions inherited from DtTerrainInterfaceConfig | |
| DtTerrainInterfaceConfig (const std::string &matchPattern="") | |
| Regexp pattern to match which the label string of whatever is being configured must match. | |
| DtTerrainInterfaceConfig & | operator= (const DtTerrainInterfaceConfig &) |
| virtual bool | loadFromFile (const std::string &file, std::ostream &log) |
| Load the values from the given file. | |
| virtual bool | loadFromFile (const std::string &file) |
| virtual bool | loadFromSourceSpecificFile (const std::string &file, const std::string &ext="mtl") |
| Load the values from the given file with the new extension if it exists. | |
| virtual void | configure (DtTerrainInterfaceConfig &config, const std::string &matchText, bool ignoreUnspecified=true) const |
| Configure config using option matchText to match subconfigurations. | |
| virtual void | configure (DtTerrainInterfaceConfig &config, bool ignoreUnspecified=true) const |
| virtual void | configurePaths (std::string &path) const |
| Replace thee , , string in the supplied parameter path. | |
| virtual void | print (std::ostream &, bool printUnspecified=true) const |
| Print object to stream. | |
| DtString | prettyPrint () const |
| void | setName (const DtString &) |
| std::string | modelDefinitionPath () const |
| std::string | simCachePath () const |
| std::string | featureConfigFile () const |
Public Member Functions inherited from DtReaderWriter | |
| DtReaderWriter () | |
| default constructor | |
| DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| real constructor Setting the readonly flag prevents object from writing itself to the stream. | |
| DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| pseudo-copy constructor | |
| DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| const DtReaderWriter & | operator= (const DtReaderWriter &orig) |
| assignment operator | |
| bool | operator== (const DtReaderWriter &) const |
| Equivalence operator. | |
| bool | operator!= (const DtReaderWriter &rhs) |
| virtual | ~DtReaderWriter () |
| destructor | |
| virtual void | putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| Top level call to write itself to file. | |
| virtual void | postPutSelf () |
| Called after either version of put self (file or environment). Default is no-op. | |
| virtual void | prePutSelf () |
| Called before either version of put self (file or environment). Default is no-op. | |
| virtual void | getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| Top level to read itself from an input stream. | |
| virtual void | postGetSelf () |
| Called after either version of getSelf (mtl or environment). Default is no-op. | |
| virtual void | preGetSelf () |
| Called before either version of get self (file or environment). Default is no-op. | |
| virtual void | writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry. | |
| virtual DtSymbolString | name () const |
| Accessor for name of this readable/writable object. | |
| virtual void | addAlias (const DtSymbolString &alias) |
| Add an alias as an alternative name for this object. | |
| virtual void | addAlias (const DtString &alias) |
| virtual bool | hasAlias (const DtSymbolString &alias) |
| virtual const aliasContainer & | aliases () const |
| virtual void | setReadonly (bool flag) |
| Set read-only flag. | |
| bool | isReadonly () const |
| virtual void | reset () |
| For those reader/writer items that support it, resets the reader/writer value to original state Default is no-op. | |
| virtual int | alignment () const |
| For those items that are sent over the network via HLA, this will give the network alignment. | |
| virtual bool | variableIsBound () const |
| virtual void | unbindVariable () |
| Sets the myVariableIsBound flag to false. | |
| virtual void | setName (const DtString &) |
| Set the name of the object. | |
| virtual const char * | readerWriterType () const |
| Used to supply a string type that this reader writer type is. | |
| virtual const char * | xmlType () const |
| virtual DtString | prettyPrint () const |
| Routine to return a human readable form of the reader/writer variable. | |
| std::string | debugText () const |
| virtual void | bindVariables (DtVariableBindingsList variableBindings) |
| Runs a variable binding pass on this reader writer and any of its children. | |
| virtual std::list < DtVariableNameType > | unboundVariables () const |
| bool | invalid () const |
| virtual bool | hasChild (const DtReaderWriter *p) const |
| Returns true if this variable has a child p in it's chain. | |
| virtual bool | hasVariableReference () const |
| Returns true if this item or any item in the registry (recursive) is a variable reference. | |
| virtual void | bindLocalVariables (const DtVariableBindingsList &variableBindings) |
| Checks to see if this RW object is a variable reference that can be bound using the provided bindings. | |
| virtual void | recordUpdateTime () const |
| Can be implemented in subclasses to stamp the time when updated. | |
| virtual bool | wasUpdatedSince (DtTime t) const |
| Can be implemented in subclasses to return true if an update occurred after the specified time. | |
| virtual bool | changedSinceLastChecked () |
| Returns true if this objects value has changed since the last time this function was called. | |
| virtual bool | peekChangedSinceLastChecked () const |
| Returns the value that changedSinceLastChecked would return but does not reset the internal flag. | |
| virtual void | putData (std::string &fp, int indentLevel=0) |
| Deriving class overrides these to get/put class specific data. | |
| virtual DtlObjPtr | getData (DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) |
| virtual void | setValueSpecified (bool specified, bool recurse=false) |
| The specified flags are used for optional values. | |
| virtual bool | valueSpecified () const |
| virtual bool | isVariableReference () const |
| Specifies whether or not this reader writer is really a variable that is specified elsewhere. | |
| virtual void | setIsVariableReference (bool value) |
| virtual void | clearAllVariableReferenceFlags () |
| Clears out all variable reference flags from all readerwriter items in registry recursively. | |
| virtual DtSymbolString | variableName () const |
| The variable name, if this object is a variable reference. | |
| virtual void | setVariableName (const DtSymbolString variableName) |
| virtual const DtReaderWriter * | defaultRWValue () const |
| The default value to use if the reader/writer object is a variable and that variable is not specified. | |
| virtual DtReaderWriter * | defaultRWValue () |
| virtual void | setDefaultRWValue (DtReaderWriter *) |
| Previous default value, if exists, will be removed and replaced with a clone of the supplied variable. | |
| virtual bool | checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| Give the stream, if the stream contains a default value then set it here. | |
| const DtReaderWriterRegistry & | registry () const |
| Collection of child DtReaderWriter nodes owned by this object. | |
| DtReaderWriterRegistry & | registry () |
| virtual DtPropertyInterface * | property () |
| virtual const DtPropertyInterface * | property () const |
| virtual DtString | toXml () const |
| virtual DtRwVariableBindings * | generateVariableBindings () const |
| Iterates over the registry (recursively) and returns a variable bindings object that contains all the variables that are contained in this read/writer class. | |
| virtual bool | toXml (const DtFilename &) const |
| Writes contents of xml result to the given filename. | |
| virtual bool | fromXml (const DtString &) |
| Restores object from given xml string. Returns true if valid. | |
| virtual bool | fromXmlFile (const DtFilename &) |
| Restores object from given xml file. | |
| virtual void | putSelf (DtEnvironmentSP, DtEnvValueSP parent) const |
| virtual void | putData (DtEnvironmentSP, DtEnvValueSP value) const |
| Override to add attributes of actual data. | |
| virtual void | putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const |
| Called when the item is a variable reference. | |
| virtual void | getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList()) |
| virtual void | getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList()) |
| Gets data from the environment value. | |
| virtual void | unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings) |
| Called when the xml reader tries to parse an unknown reader/writer item. Default is a no-op. | |
| virtual void | getVariableReference (DtEnvironmentSP, DtEnvValueSP value) |
| Called when the item is a variable reference. | |
Protected Types | |
| typedef tbb::spin_rw_mutex | Mutex |
Protected Member Functions | |
| virtual void | addTerrain (const osg::ref_ptr< osg::Node > &node, DtVrfSimTerrainProcessor &) |
| virtual void | removeTerrain (const osg::ref_ptr< osg::Node > &node) |
| virtual void | addTriangles (unsigned int) |
| Adds triangles to the triangle count. | |
| virtual void | removeTriangles (unsigned int) |
| Removes triangles from the triangle count. | |
Protected Attributes | |
| Mutex | myMutex |
| DtString | myName |
| tbb::atomic< bool > | myQuitFlag |
| Set when the paging should stop. | |
| DtVantageTerrainEngine * | myTerrainEngine |
| Pointer to the terrain implementation's terrain engine. | |
| DtTerrainSourceTracker * | myTerrainSourceTracker |
| The terrain source tracker that is updated by this pager. | |
| double | myCurrentTime |
| Time to compare a command's expire time to before executing the command. | |
| DtPagerCommandQueue | myCommandQueue |
| Thread-safe queue to put commands on. | |
| DtCommandPriorityMultimap | myPriorityCommandMultimap |
| Multimap of priorities to paging commands. | |
| unsigned long | myNumTriangles |
| Number of triangles paged in to this pager. | |
| TerrainRecord::Map | myTerrainRecords |
| boost::optional< short int > | myDefaultBulletObjectMask |
Protected Attributes inherited from DtTerrainInterfaceConfig | |
| TString | myModelDefinitionPath |
| Parameter Name: model-definition-path. | |
| TString | mySimCachePath |
| Parameter Name: sim-cache-path Default: /cache/vrfsim. | |
| TString | myFeatureConfigFile |
| Parameter Name: features-config-file Default: /settings/featureconfig.txt. | |
Protected Attributes inherited from DtReaderWriter | |
| const DtSymbolString | myName |
| DtReaderWriterRegistry | myRegistry |
| DtReaderWriterRegistry * | myParentRegistry |
| bool | myValueSpecified |
| bool | myReadOnlyFlag |
| bool | myIsVariableReference |
| DtSymbolString | myVariableName |
| bool | myVariableIsBound |
| DtReaderWriter * | myDefaultValue |
| aliasContainer | myAliases |
| Container for the aliases which represent alternative names for the object. | |
| bool | myInvalid |
| Set to true if there is a problem reading this item. | |
| bool | myChangedFlag |
| Set to true when value changes Set to false when value checked with changedSinceLastChecked. | |
Additional Inherited Members | |
Public Types inherited from DtReaderWriter | |
| typedef std::vector < DtSymbolString > | aliasContainer |
| typedef std::vector < DtSymbolString >::iterator | aliasIter |
| typedef std::vector < DtSymbolString > ::const_iterator | aliasConstIter |
| typedef std::vector< DtFilename > | SearchPaths |
| typedef std::pair < DtSymbolString, DtString > | DtVariableNameType |
| typedef DtReaderWriterFactory *(* | DtReaderWriterFactoryCreatorFcn )() |
Static Public Member Functions inherited from DtTerrainInterfaceConfig | |
| static void | setModelDefinitionDefault (const std::string &) |
Public Attributes inherited from DtTerrainInterfaceConfig | |
| TInt | maxNetworkThreads |
| Parameter Name: max-feature-network-threads Parameter Description: The max number of background threads that will be used to read streaming feature data. | |
| TInt | maxUnusedFeatures |
| Parameter Name: max-unused-features Parameter Description: Max number of unused features to store in memory. | |
| TInt | areaPageTableLoadingThreads |
| Parameter Name: area-page-table-threads Parameter Description: Max number of simultaneous threads that will be used for executing feature loading tasks for area features. | |
| TInt | featuresHighestLoadLOD |
| Parameter Name: features-highest-load-LOD Parameter Description: The smallest tile (highest LOD) for loading features. | |
| TInt | featuresLowestLoadLOD |
| Parameter Name: features-lowest-load-LOD Parameter Description: The largest tile (smallest LOD) for loading features. | |
| TInt | featuresPerTileTarget |
| Parameter Name: features-per-tile-target Parameter Description: Target number of features per tile. | |
| TInt | featuresMaxIndexLOD |
| Parameter Name: features-max-index-LOD Parameter Description: Smallest tile LOD level to index features. | |
| TInt | minFeaturesToIndexTile |
| Parameter Name: min-features-to-index-tile Parameter Description: Minumum number of features in a tile for the tile to be considered for subindexing. | |
| TReal | featuresIndexRatio |
| Parameter Name: features-index-ratio Parameter Description: If the ratio of the number of features in a parent tile to the number in a subtile is greater than this value then the tile will be subindexed. | |
| TBool | deduplicateFeatures |
| Parameter Name: deduplicate-features Parameter Description: Remove duplicate features. | |
| TBool | cacheLastFeatureTile |
| Parameter Name: cache-last-feature-tile Parameter Description: Cache last used feature tile Parameter Default: True. | |
| TBool | loadTerraPageImagery |
| Parameter Name: load-terra-page-imagery Parameter Description: Whether or not to have the back-end load imagery when loading terra page databases This will use less memory but will disable soil types Parameter Default: True. | |
| TBool | loadTerraPageLocalMaterials |
| Parameter Name: load-terra-page-local-materials Parameter Description: Whether or not to have the back-end load local materials when loading terra page databases This will use less memory and may disable some soil types, but not all Parameter Default: False. | |
| TInt | pathFinderMaxSize |
| Parameter Name: pathfinder-max-features Parameter Description: The max size of a DtAStarGraph. | |
| TInt | pathFinderPageTableDepth |
| Parameter Name: pathfinder-page-table-depth Parameter Description: The depth of the Quad-Tree used for tracking loaded features for each pathfinder road graph. | |
| TReal | pathFinderLoadTimeout |
| Parameter Name: pathfinder-load-timeout Parameter Description: The amount of time (in seconds) that the path finder will wait on loading a tile of features before giving up on that tile. | |
| TReal | pathFinderVertexTolerance |
| Parameter Name: pathfinder-vertex-tolerance Parameter Description: The distance tolerance (in meters) within which feature vertices are considered to be the same vertex. | |
| TInt | pathFinderMinVertexSearch |
| Parameter Name: pathfinder-min-vertex-search Parameter Description: The minimum number of vertices the graph search will use to before giving up. | |
| TReal | pathFinderDotProductDistanceThreshold |
| Parameter Name: pathfinder-dot-product-distance-threshold Parameter Description: Heuristic which measures progress towards the destination. | |
| TReal | pathFinderMinSearchRadius |
| Parameter Name: pathfinder-min-search-radius Parameter Description: Minumum distance path finder will search away from straight line path from source to destination before giving up. | |
| TInt | triangleThreshold |
| Parameter Name: num-triangles-threshold Parameter Description: Maximum number of triangles. | |
| TInt | cacheOnlyMaxLod |
| Parameter Name: cache-only-max-lod Parameter Description: Max level of detail to use when in cache-only mode. | |
| TBool | loadImagery |
| Parameter Name: load-imagery Parameter Description: Whether the terrain system will load imagery it doesn't need. | |
| TInt | blockingIntersectPageInPriority |
| Parameter Name: blocking-intersect-page-in-priority Parameter Description: Priority for paging in data for blocking intersect requests. | |
| TInt | intersectPageInPriority |
| Parameter Name: intersect-page-in-priority Parameter Description: Priority for paging in data for non-blocking intersect requests. | |
| TInt | pageOutPriority |
| Parameter Name: page-out-priority Parameter Description: Priority for paging out data. | |
| TInt | defaultPreloadPriority |
| Parameter Name: default-preload-priority Parameter Description: Default priority for preload geometry. | |
| TVector | spatialSubdivisionDimensions |
| Parameter Name: spatial-subdivision-dimensions Parameter Description: Parameters for Spatial Subdivision used by DtBoundingVolumeTerrainSourceTracker to determine which paged-out nodes should be paged in. | |
| TBool | useS57ForTerrainGeneration |
| Parameter Name: use-S57-for-terrain-generation Parameter Description: Flag for S57 to terrain and soil types. | |
| TBool | oceanLayerPresent |
| Parameter Name: ocean-layer-present Enable/disable ocean layer-present Default: True. | |
| TReal | seaLevel |
| Parameter Name: sea-level Sea level in meters Default: | |
| TReal | seaFloor |
| Parameter Name: sea-floor Sea floor in meters. | |
| TBool | useSoundingPoints |
| Parameter Name: use-sounding-points Default: True. | |
| TBool | pageFeatures |
| Parameter Name: page-features Default: True. | |
| TString | LOSFeaturesQueryName |
| Parameter Name: los-features-query Default: MAK_LOS_OBSTACLE. | |
| TReal | featuresMinUnloadTime |
| Parameter Name: features-min-unload-time Default: 15. | |
| TInt | terrainMinUnloadIntersectDiff |
| Parameter Name: terrain-min-unload-intersect-diff Default: 50. | |
| TInt | minElevationIndexLOD |
| Parameter Name: min-elevation-index-lod Parameter Description: Minimum LOD to check for elevation intersections in. | |
| TInt | maxElevationIndexLOD |
| Parameter Name: max-elevation-index-lod Parameter Description: Maximum LOD to check for elevation intersections in. | |
| TReal | elevationTriangleOutputMergeTolerance |
| Parameter Name: elevation-triangle-output-merge-tolerance Parameter Description: Error tolerance between gui correlated surface and triangles output in DtTerrainInterface::trianglesInArea. | |
| TReal | elevationIntersectTriangleMergeTolerance |
| Parameter Name: elevation-intersect-triangle-merge-tolerance Parameter Description: Error tolerance between gui correlated surface and triangles output when doing terrain intersections. | |
| TReal | maxChordLengthBeforeSplit |
| Parameter Name: max-chord-length-before-split Parameter Description: Maximum length of chords before they can be split. | |
| TInt | maxElevationChordSplitTestLOD |
| Parameter Name: max-elevation-chord-split-test-lod Parameter Description: When doing intersections over very large areas there may be errors introduced due to coordinate system conversions. | |
| TInt | lowFidelityIntersectionLOD |
| Parameter Name: low-fidelity-intersection-lod Parameter Description: LOD to use when doing low fidelity terrain intersections. | |
| TString | pluginsDirectory |
| Parameter Name: plugins-directory Default: ../(plugins|plugins64)/(release|debug) | |
Static Protected Attributes inherited from DtReaderWriter | |
| static DtString | theUnspecifiedValue |
| static DtGetSelfCallbackInfo | thePostGetSelfCallback |
| static DtPutSelfCallbackInfo | thePrePutSelfCallback |
| static const DtVariableBindingsList | theEmptyVariableBindingsList |
| static bool | theCreatorFcnSet |
| static DtReaderWriterFactory * | theFactory |
| static DtReaderWriterFactoryCreatorFcn | theFactoryCreatorFcn |
| static bool | thePutIndent |
| static DtOutputStream * | theOutputStream |
DtTerrainSourcePager is the base class for terrain pagers.
There will be one terrainSourcePager per terrain patch. They will each handle paging in terrain from an individual source, such as metaflight, paged .ive, or osgEarth streaming terrain.
|
protected |
| DtTerrainSourcePager::DtTerrainSourcePager | ( | DtVantageTerrainEngine * | terrainEngine | ) |
Constructor.
|
virtual |
Destructor. Deletes all pending commands and myTerrainSourceTracker.
|
virtual |
Called after pager is configured.
Reimplemented in DtOsgEarthTerrainSourcePager.
|
virtual |
Processes commands from the priority-sorted command map.
Executes the first command and returns, or expires commands until it finds a command to execute.
|
pure virtual |
Creates and returns a DtTerrainSourceTracker.
Implemented in DtTerraPageTerrainSourcePager, DtOsgEarthTerrainSourcePager, DtPagedLodTerrainSourcePager, and DtMetaflightTerrainSourcePager.
|
virtual |
Accessor for myTerrainSourceTracker.
|
pure virtual |
|
virtual |
Calls processCommandQueue to add new commands into the priority-sorted command map.
Then returns the priority of the highest-priority pending command.
|
virtual |
Takes incoming commands off the command queue and adds them to the priority-sorted command map.
|
virtual |
Sets myCurrentTime for purposes of expiring old page-in commands.
The time passed in will only be used if it is greater than myCurrentTime.
| The | new time to use for expiring commands. |
Number of triangles paged in to this pager.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Adds triangles to the triangle count.
|
protectedvirtual |
Removes triangles from the triangle count.
|
mutableprotected |
|
protected |
|
protected |
Set when the paging should stop.
|
protected |
Pointer to the terrain implementation's terrain engine.
This class does not own the terrain engine.
|
protected |
The terrain source tracker that is updated by this pager.
|
protected |
Time to compare a command's expire time to before executing the command.
If the command's expire time is less than the current time, the command will not be executed.
|
protected |
Thread-safe queue to put commands on.
|
protected |
Multimap of priorities to paging commands.
Commands are taken off the queue and put here until they are either executed or expired.
Number of triangles paged in to this pager.
|
protected |
|
protected |