![]() |
VR-Forces Developer's Guide
|
Class DtTerrainInterfaceConfig is a readable-writable class holding terrain interface configuration options. This class lives in vrfutil so that it is not necessary to depend on terrain interface to use this config object.

Classes | |
| class | Configator |
| class | ListT |
| class | TerrainParam |
Public Member Functions | |
| DtTerrainInterfaceConfig (const std::string &matchPattern="") | |
| DtTerrainInterfaceConfig & | operator= (const DtTerrainInterfaceConfig &) |
| virtual bool | loadFromFile (const std::string &file, std::ostream &log) |
| virtual bool | loadFromFile (const std::string &file) |
| virtual bool | loadFromSourceSpecificFile (const std::string &file, const std::string &ext="mtl") |
| virtual void | configure (DtTerrainInterfaceConfig &config, const std::string &matchText, bool ignoreUnspecified=true) const |
| virtual void | configure (DtTerrainInterfaceConfig &config, bool ignoreUnspecified=true) const |
| virtual void | configurePaths (std::string &path) const |
| virtual void | print (std::ostream &, bool printUnspecified=true) const |
| 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 () | |
| DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL) | |
| const DtReaderWriter & | operator= (const DtReaderWriter &orig) |
| bool | operator== (const DtReaderWriter &) const |
| bool | operator!= (const DtReaderWriter &rhs) const |
| virtual | ~DtReaderWriter () |
| virtual void | putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| virtual void | postPutSelf () |
| virtual void | prePutSelf () |
| virtual void | getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| virtual void | postGetSelf () |
| virtual void | preGetSelf () |
| virtual void | writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| virtual DtSymbolString | name () const |
| virtual void | addAlias (const DtSymbolString &alias) |
| virtual void | addAlias (const DtString &alias) |
| virtual bool | hasAlias (const DtSymbolString &alias) |
| virtual const aliasContainer & | aliases () const |
| virtual void | setReadonly (bool flag) |
| bool | isReadonly () const |
| virtual void | reset () |
| virtual int | alignment () const |
| virtual bool | variableIsBound () const |
| virtual void | unbindVariable () |
| virtual const char * | readerWriterType () const |
| virtual const char * | xmlType () const |
| std::string | debugText () const |
| virtual void | bindVariables (DtVariableBindingsList variableBindings) |
| virtual std::list < DtVariableNameType > | unboundVariables () const |
| bool | invalid () const |
| virtual bool | hasChild (const DtReaderWriter *p) const |
| virtual bool | hasVariableReference () const |
| virtual void | bindLocalVariables (const DtVariableBindingsList &variableBindings) |
| virtual void | recordUpdateTime () const |
| virtual bool | changedSinceLastChecked () |
| virtual bool | peekChangedSinceLastChecked () const |
| virtual void | putData (std::string &fp, int indentLevel=0) |
| virtual DtlObjPtr | getData (DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) |
| virtual void | setValueSpecified (bool specified, bool recurse=false) |
| virtual bool | valueSpecified () const |
| virtual bool | isVariableReference () const |
| virtual void | setIsVariableReference (bool value) |
| virtual void | clearAllVariableReferenceFlags () |
| virtual DtSymbolString | variableName () const |
| virtual void | setVariableName (const DtSymbolString variableName) |
| virtual const DtReaderWriter * | defaultRWValue () const |
| virtual DtReaderWriter * | defaultRWValue () |
| virtual void | setDefaultRWValue (DtReaderWriter *) |
| virtual bool | checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| const DtReaderWriterRegistry & | registry () const |
| DtReaderWriterRegistry & | registry () |
| virtual DtPropertyInterface * | property () |
| virtual const DtPropertyInterface * | property () const |
| virtual DtString | toXml () const |
| virtual DtRwVariableBindings * | generateVariableBindings () const |
| virtual bool | toXml (const DtFilename &) const |
| virtual bool | fromXml (const DtString &) |
| virtual bool | fromXmlFile (const DtFilename &) |
| virtual void | putSelf (DtEnvironmentSP, DtEnvValueSP parent) const |
| virtual void | putData (DtEnvironmentSP, DtEnvValueSP value) const |
| virtual void | putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const |
| 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()) |
| virtual void | unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings) |
| virtual void | getVariableReference (DtEnvironmentSP, DtEnvValueSP value) |
Static Public Member Functions | |
| static void | setModelDefinitionDefault (const std::string &) |
Static Public Member Functions inherited from DtReaderWriter | |
| static void | putIndent (std::string &fp, int indentLevel) |
| static const DtVariableBindingsList & | nullVariableReference () |
| static void | setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData) |
| static void | setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData) |
| static void | setPutIndent (bool) |
| static bool | putIndent () |
| static const char * | theXmlType () |
| static const DtFilename & | appPath () |
| static void | setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn) |
| static void | createReaderWriterFactory () |
| static void | cleanupFactory () |
| static DtReaderWriterFactory * | factory () |
| static void | setOutputStream (DtOutputStream *stream) |
| static DtOutputStream & | outputStream () |
| static DtReaderWriter * | createFromXmlFile (const DtFilename &, bool createAsProperty=false) |
| static DtReaderWriter * | createFromXml (const DtString &, bool createAsProperty=false) |
| static DtReaderWriter * | createFromEnvironment (DtEnvironmentSP, bool createAsProperty=false) |
| static DtString | getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root) |
Protected Attributes | |
| TString | myModelDefinitionPath |
| TString | mySimCachePath |
| TString | myFeatureConfigFile |
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 |
| bool | myInvalid |
| bool | myChangedFlag |
Private Types | |
| typedef TerrainParam< DtRwBoolean > | TBool |
| typedef TerrainParam< DtRwInt > | TInt |
| typedef TerrainParam< DtRwReal > | TReal |
| typedef TerrainParam< DtRwString > | TString |
| typedef TerrainParam< DtRwVector > | TVector |
| typedef ListT < DtTerrainInterfaceConfig > | TList |
Private Attributes | |
| TList | subconfigurations |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
explicit |
Regexp pattern to match which the label string of whatever is being configured must match. Exactly what the string is (data source name, query type, etc.) is up to the user of this class and may be different in different situations. Values which are not present will be set to defaults and set as unspecified.
| DtTerrainInterfaceConfig& DtTerrainInterfaceConfig::operator= | ( | const DtTerrainInterfaceConfig & | ) |
|
virtual |
Load the values from the given file.
|
virtual |
|
virtual |
Load the values from the given file with the new extension if it exists. The file given with have its extension replaced by ext and this is The file that will be parsed.
|
virtual |
Configure config using option matchText to match subconfigurations. If matchText is supplied and this object has a matchPattern value then the function will only proceed if the matchText matches the pattern, otherwise nothing is done as this configuration doesn't apply. The specified values in this object will then be assigned to the values in config, and then the subconfigurations of this object will be iterated over Exactly what you are matching against is up to the user. The purpose of matchPattern is just so that you can use this class in whatever context it is needed and be able to use whatever string is appropriate in that context to discriminate configurations. It is a string which describes whatever thing you are configuring and want to make a named subconfiguration for. All matching configurations are applied, it is probably not a good idea to make many subconfigurations which match the same string but that is up to the user. and the same process applied to each.
| config | Object to be configured. |
| matchText | Text to match against matchPattern. |
|
virtual |
|
virtual |
Replace thee , , string in the supplied parameter path.
|
virtual |
Print object to stream.
|
virtual |
Routine to return a human readable form of the reader/writer variable. Not all reader/writer classes implement this feature. Default is to return an empty string.
Reimplemented from DtReaderWriter.
|
virtual |
Set the name of the object. Uses the myName variable. Only set if you understand that this could have effects on other parts of the system that are unknown (especially if this item has already been added to a registry).
Under normal usage, this name is set as a process of creating an item from a factory or as part of a constructor. Only use this method if an item is created from a factory, and the name is not known until after created from that factory, before adding to the registry of another item
Reimplemented from DtReaderWriter.
|
static |
| std::string DtTerrainInterfaceConfig::modelDefinitionPath | ( | ) | const |
| std::string DtTerrainInterfaceConfig::simCachePath | ( | ) | const |
| std::string DtTerrainInterfaceConfig::featureConfigFile | ( | ) | const |
|
private |
Parameter Name: subconfigurations Parameter Description: A list of DtTerrainInterfaceConfig objects which can be used to make more specific configurations. See configure() Default: <empty>
| TInt DtTerrainInterfaceConfig::maxNetworkThreads |
Parameter Name: max-feature-network-threads
Parameter Description: The max number of background threads that will be used
to read streaming feature data. Parameter Default Value: 4.
| TInt DtTerrainInterfaceConfig::maxUnusedFeatures |
Parameter Name: max-unused-features
Parameter Description: Max number of unused features to store in memory.
Once this threshold has been reached, unused features will be paged out
until the number is below this threshold. Parameter Default Value: 500000.
| TInt DtTerrainInterfaceConfig::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. Parameter Default Value: 4.
| TInt DtTerrainInterfaceConfig::featuresHighestLoadLOD |
Parameter Name: features-highest-load-LOD Parameter Description: The smallest tile (highest LOD) for loading features.
Higher values will create smaller tiles. Parameter Default Value: 15.
| TInt DtTerrainInterfaceConfig::featuresLowestLoadLOD |
Parameter Name: features-lowest-load-LOD Parameter Description: The largest tile (smallest LOD) for loading features.
Higher values will create smaller tiles. Parameter Default Value: 9.
| TInt DtTerrainInterfaceConfig::featuresPerTileTarget |
Parameter Name: features-per-tile-target Parameter Description: Target number of features per tile.
Parameter Default Value: 100.
| TInt DtTerrainInterfaceConfig::featuresMaxIndexLOD |
Parameter Name: features-max-index-LOD Parameter Description: Smallest tile LOD level to index features.
Parameter Default: 20.
| TInt DtTerrainInterfaceConfig::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. Parameter Default: 5.
| TReal DtTerrainInterfaceConfig::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. Parameter Default: 2.0.
| TBool DtTerrainInterfaceConfig::deduplicateFeatures |
Parameter Name: deduplicate-features Parameter Description: Remove duplicate features. Parameter Default: True.
| TBool DtTerrainInterfaceConfig::cacheLastFeatureTile |
Parameter Name: cache-last-feature-tile Parameter Description: Cache last used feature tile Parameter Default: True.
| TBool DtTerrainInterfaceConfig::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 DtTerrainInterfaceConfig::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 DtTerrainInterfaceConfig::pathFinderMaxSize |
Parameter Name: pathfinder-max-features Parameter Description: The max size of a DtAStarGraph. Once a path
finder has exceeded this number of loaded features, it will be deleted,
to be recreated the next time a path plan is requested. Parameter Default Value: 50000.
| TInt DtTerrainInterfaceConfig::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. Parameter Default Value: 14.
| TReal DtTerrainInterfaceConfig::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. Parameter Default Value: 20 Parameter Units: seconds.
| TReal DtTerrainInterfaceConfig::pathFinderVertexTolerance |
Parameter Name: pathfinder-vertex-tolerance Parameter Description: The distance tolerance (in meters) within which
feature vertices are considered to be the same vertex. Used when features
are added to the DtAStarGraph's graph. Parameter Default Value: 1.0 Parameter Units: meters.
| TInt DtTerrainInterfaceConfig::pathFinderMinVertexSearch |
Parameter Name: pathfinder-min-vertex-search Parameter Description: The minimum number of vertices the graph search will
use to before giving up. Parameter Default Value: 20.
| TReal DtTerrainInterfaceConfig::pathFinderDotProductDistanceThreshold |
Parameter Name: pathfinder-dot-product-distance-threshold Parameter Description: Heuristic which measures progress towards the destination. Making this larger will cause the path planner to search out farther into the graph to try and find a better path. Parameter Default Value: 700.
| TReal DtTerrainInterfaceConfig::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. Parameter Default Value: 1000.
| TInt DtTerrainInterfaceConfig::pathFinderMaxDisjointNetworks |
Parameter Name: pathfinder-max-disjoint-networks Parameter Description: Maximum number of additional road networks, disjoint with the network containing the closest road to the start, that will be searched when the first network does not reach the destination. A value of 0 will mean that only the closest network is searched.
Notes:
Parameter Default Value: 0
| TInt DtTerrainInterfaceConfig::triangleThreshold |
Parameter Name: num-triangles-threshold
Parameter Description: Maximum number of triangles. Once the number of
triangles exceeds this number, data will be paged out until we are
below this threshold.
Parameter Default Value: 10000000.
| TInt DtTerrainInterfaceConfig::cacheOnlyMaxLod |
Parameter Name: cache-only-max-lod
Parameter Description: Max level of detail to use when in cache-only mode.
Parameter Default Value: 13.
| TBool DtTerrainInterfaceConfig::loadImagery |
Parameter Name: load-imagery
Parameter Description: Whether the terrain system will load imagery it doesn't need.
This is generally a debugging feature, sometimes drivers will get confused if imagery
isn't present, even if it's not being used for anything.
Parameter Default Value: False.
| TInt DtTerrainInterfaceConfig::blockingIntersectPageInPriority |
Parameter Name: blocking-intersect-page-in-priority Parameter Description: Priority for paging in data for blocking
intersect requests.
Parameter Default Value: 10.
| TInt DtTerrainInterfaceConfig::intersectPageInPriority |
Parameter Name: intersect-page-in-priority Parameter Description: Priority for paging in data for non-blocking
intersect requests.
Parameter Default Value: 20.
| TInt DtTerrainInterfaceConfig::pageOutPriority |
Parameter Name: page-out-priority
Parameter Description: Priority for paging out data.
Parameter Default Value: 30.
| TInt DtTerrainInterfaceConfig::defaultPreloadPriority |
Parameter Name: default-preload-priority
Parameter Description: Default priority for preload geometry. This
priority will be used if one is not provided by the preload controller.
Parameter Default Value: 40.
| TVector DtTerrainInterfaceConfig::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. Parameter Default Value: 10 10 10.
| TBool DtTerrainInterfaceConfig::useS57ForTerrainGeneration |
Parameter Name: use-S57-for-terrain-generation
Parameter Description: Flag for S57 to terrain and soil types.
Parameter Default Value: True.
| TBool DtTerrainInterfaceConfig::oceanLayerPresent |
Parameter Name: ocean-layer-present
Enable/disable ocean layer-present
Default: True.
| TReal DtTerrainInterfaceConfig::seaLevel |
Parameter Name: sea-level
Sea level in meters
Default:
| TReal DtTerrainInterfaceConfig::seaFloor |
Parameter Name: sea-floor
Sea floor in meters.
Default:
| TBool DtTerrainInterfaceConfig::useSoundingPoints |
Parameter Name: use-sounding-points
Default: True.
| TBool DtTerrainInterfaceConfig::pageFeatures |
Parameter Name: page-features
Default: True.
| TReal DtTerrainInterfaceConfig::featuresMinUnloadTime |
Parameter Name: features-min-unload-time
Default: 15.
| TInt DtTerrainInterfaceConfig::terrainMinUnloadIntersectDiff |
Parameter Name: terrain-min-unload-intersect-diff Default: 50.
| TInt DtTerrainInterfaceConfig::minElevationIndexLOD |
Parameter Name: min-elevation-index-lod Parameter Description: Minimum LOD to check for elevation intersections in. This setting prevents the terrain system from using elevation in lower LODs when doing intersection computations. Default: 3.
| TInt DtTerrainInterfaceConfig::maxElevationIndexLOD |
Parameter Name: max-elevation-index-lod Parameter Description: Maximum LOD to check for elevation intersections in. This setting prevents the terrain system from using elevation in higher LODs when doing intersection computations. Default: 19.
| TReal DtTerrainInterfaceConfig::elevationTriangleOutputMergeTolerance |
Parameter Name: elevation-triangle-output-merge-tolerance Parameter Description: Error tolerance between gui correlated surface and triangles output in DtTerrainInterface::trianglesInArea. Setting this to greater than 0 allows the terrain to output fewer triangles when they are sufficiently coplanar to the true triangles. Default: 0.
| TReal DtTerrainInterfaceConfig::elevationIntersectTriangleMergeTolerance |
Parameter Name: elevation-intersect-triangle-merge-tolerance Parameter Description: Error tolerance between gui correlated surface and triangles output when doing terrain intersections. Setting this to greater than 0 allows the terrain to use fewer triangles when they are sufficiently coplanar to the true triangles. Default: 0.
| TReal DtTerrainInterfaceConfig::maxChordLengthBeforeSplit |
Parameter Name: max-chord-length-before-split Parameter Description: Maximum length of chords before they can be split. When doing intersections over very large areas there may be errors introduced due to coordinate system conversions. Chords over this length will be split into subchords and then have their intersection results added back together. Setting it lower will cause the system to break large chord into smaller ones which will improve accuracy at the cost of performance. Default: 10000.
| TInt DtTerrainInterfaceConfig::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. The elevation system will split them recursively, and at each level it will attempt to reject the chord by comparing it to the max altitude off the elevation it covers before splitting it. This setting controls the max LOD that will be used to to find the max elevation. Changing increasing this setting will affect performance. It is not possible to tell whether increasing or decreasing will yield better performance, it must be tested. Default: 4.
| TInt DtTerrainInterfaceConfig::lowFidelityIntersectionLOD |
Parameter Name: low-fidelity-intersection-lod Parameter Description: LOD to use when doing low fidelity terrain intersections. Default: 8.
| TString DtTerrainInterfaceConfig::pluginsDirectory |
Parameter Name: plugins-directory
Default: ../(plugins|plugins64)/(release|debug)
| TInt DtTerrainInterfaceConfig::featureIntersectionMode |
Parameter Name: feature-intersection-mode
Parameter Description: Configure Feature intersection mode default behavior.
Values: DoNotUseFeaturesToIntersect = 0 IntersectOnlyIfSurfaceUnspecified = 1 IntersectAlways = 2 Parameter Default Value: 0.
| TBool DtTerrainInterfaceConfig::activePagerTbbMode |
Parameter Name: active-pager-tbb-mode
Parameter Description: Configure the active pager multi - thread default behavior. Using TBB for the active pager can make performance gain on database with multiple layers(like many procedural trees layer) If enable then the intersection will run in parallel for these layers Note this can slow down other databases.It also depend on the number of core the PC running vrfSim run Default: False.
| TInt DtTerrainInterfaceConfig::nbTerrainThread |
Parameter Name: nbTerrainThread
Parameter Description: Number of terrain thread to start.
Values: Parameter Default Value: 1.
| TInt DtTerrainInterfaceConfig::minElevationTileLoadingLod |
Parameter Name: minElevationTileLoadingLod
Parameter Description: Minimum LOD to load elevation tiles. This setting prevents the terrain system from using elevation in lower LODs when loading elevation tiles(this prevent tiles with constraints to take a long time to be created since for ex.craters are created at LOD19) Parameter Default Value: 13.
| TBool DtTerrainInterfaceConfig::proceduralSimVegetationEnabled |
Parameter Name: procedural_sim_vegetation_enabled Configure if we want the procedural sim trees to be enabled / disabled in the sim. This parameter overwrite the value found in biome.vegetation.config.xml <Vegetation name = "Vegetation" vrfsim:enabled = "true"> If you set the above value to true and this one to false the procedural trees(and other possible vegetation will not be in the sim) Default: Enable procedural sim vegetation = True.
|
protected |
Parameter Name: model-definition-path. Will append /ModelDefinitions so keep this at the root
Default: "$(SHARED_DATA_DIR)/ModelData/Configuration/Definitions".
|
protected |
Parameter Name: sim-cache-path
Default: /cache/vrfsim.
|
protected |
Parameter Name: features-config-file
Default: /settings/featureconfig.txt.