![]() |
VR-Forces Developer's Guide
|
DtOsgEarthTerrainSourcePager is a derived terrainSourcePager that handles a streaming terrain source.

Public Member Functions | |
| DtOsgEarthTerrainSourcePager (DtVantageTerrainEngine *terrainEngine, osgEarth::MapNode *mapNode) | |
| virtual | ~DtOsgEarthTerrainSourcePager () |
| virtual DtTerrainSourceTracker * | createTerrainSourceTracker (DtVantageTerrainEngine *) |
| virtual bool | init () |
| virtual void | tick () |
| virtual bool | pageInTiles (DtTileKeyList &tileIds, DtTerrainIntersectIDType intersectId=0, bool forcePageInAllData=false) |
| virtual bool | pageOutTiles (const DtTileKeyList &tilesToRemove) |
| virtual void | updatePageTracker (DtTerrainIntersectIDType intersectId=0) |
| virtual int | highestPriorityPendingWork () |
| virtual const unsigned int | determineTrackerLod () |
| virtual osgEarth::TerrainOptionsAPI | osgEarthTerrainOptions () const |
| virtual void | findMissingTiles (const DtTerrainPagingGeometryPtr &geometry, DtTileKeyList &tiles) const |
| unsigned | reloadQueuedPages () |
| virtual unsigned | queuePageReloadsWithinExtent (const osgEarth::GeoExtent &extent, const DtUUID &dynamicUuid, bool isRemoval=false) |
| virtual void | setTerrainSourcePagerName (const std::string &name) |
| virtual DtTerrainIntersectOptions::Fidelity | intersectFidelity () const |
| virtual void | setIntersectFidelity (DtTerrainIntersectOptions::Fidelity) |
Public Member Functions inherited from DtTerrainSourcePager | |
| DtTerrainSourcePager (DtVantageTerrainEngine *terrainEngine, osgEarth::MapNode *mapNode) | |
| virtual | ~DtTerrainSourcePager () |
| virtual void | setEarthFileName (const DtFilename &file) |
| virtual void | setCutoutFilename (const char *OptionalSuffixe=NULL) |
| virtual bool | isContainedWithinCutoutCache (const osgEarth::GeoExtent &extent, const osgEarth::TileKey &key) |
| virtual DtTerrainSourceTracker * | terrainSourceTracker () |
| virtual void | processCommandQueue () |
| virtual void | setCurrentTime (const double ¤tTime) |
| virtual unsigned long | numTriangles () const |
| virtual bool | quitFlagSet () const |
| virtual void | setQuit (bool) |
| virtual const Coordinate_System * | localCS () const |
| virtual void | setLabel (const DtString &) |
| virtual DtString | label () const |
| virtual void | clearCutoutCache () |
| virtual void | clearTerrainEngineReference () |
Public Member Functions inherited from DtTerrainInterfaceConfig | |
| 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 osgTerrain::Locator * | createLocatorForKey (const osgEarth::TileKey &key, const osgEarth::Util::MapNode &mapInfo) |
Static Public Member Functions inherited from DtTerrainInterfaceConfig | |
| 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 Member Functions | |
| virtual unsigned | queuePagesToReloadNotAlreadyLoaded (const osgEarth::GeoExtent &extent) |
| virtual bool | reloadTile (const osgEarth::TileKey &tileKey, bool isRemoval=false) |
| virtual bool | findFirstParent (osgEarth::TileKey &firstParentTileKey, const osgEarth::TileKey &tileKey) |
| virtual bool | modifyMaskExtentsForFirstParent (const boost::shared_ptr< DtTileData > tileData, bool isRemoval=false) |
| virtual bool | pageInTile (const osgEarth::TileKey &tileKey, DtTerrainIntersectIDType intersectId=0, bool forcePageInAllData=false) |
| virtual bool | pageOutTile (const osgEarth::TileKey &tileKey, bool pageOutSubtiles) |
| virtual boost::shared_ptr < DtTileData > | createTileDataFromTileModel (const osgEarth::TileKey &tilekey, DtTerrainIntersectIDType intersectId, bool createIfAlreadyLoaded=false) const |
| virtual boost::shared_ptr < DtTileData > | createTileDataFromHeightfield (const osgEarth::TileKey &tilekey, DtTerrainIntersectIDType intersectId, const osg::ref_ptr< const osg::HeightField > &heightfield) const |
| virtual boost::shared_ptr < DtTileData > | createTileDataFromGeometry (const osgEarth::TileKey &tilekey, DtTerrainIntersectIDType intersectId, const osg::ref_ptr< osg::Node > &geometry) const |
| virtual void | addTile (const osgEarth::TileKey &tilekey, const boost::shared_ptr< DtTileData > &tile) |
| virtual void | addEmptyTile (const osgEarth::TileKey &tilekey, DtTerrainIntersectIDType intersectId=0) |
| virtual void | addMasks (const osgEarth::TileKey &tilekey, const boost::shared_ptr< DtTileData > &tile) |
| virtual bool | hasConstraintsOrDynamicTerrain (const TileKey &key) |
Protected Member Functions inherited from DtTerrainSourcePager | |
| virtual unsigned int | addTerrain (const osg::ref_ptr< osg::Node > &node, DtVrfSimTerrainProcessor &, const char *debugWhoisCalling="unknown") |
| virtual unsigned int | removeTerrain (const osg::ref_ptr< osg::Node > &node, const char *debugWhoisCalling="unknown") |
| virtual void | addTriangles (unsigned int, const char *debugString="unknown") |
| virtual void | removeTriangles (unsigned int, const char *debugString="unknown") |
| void | modifyDynamicTerrainExtent (const DtPoint &swCorner, const DtPoint &neCorner, bool isRemoval, unsigned amount=1) |
| bool | hasDynamicTerrainWithinExtent (const DtPoint &swCorner, const DtPoint &neCorner) const |
| bool | modifyDynamicTerrain (const osgEarth::GeoExtent &dynamicTerrainExtent, const DtUUID &dynamicTerrainUUID, bool isRemoval) |
| bool | hasDynamicTerrainWithinExtent (std::vector< DtDynamicTerrainRtreeValue > &values, const osgEarth::GeoExtent &extent) |
| void | eraseCommand (DtCommandPriorityMultimap::iterator &itr) |
| void | eraseAndInsertCommand (DtCommandPriorityMultimap::iterator &itr) |
| bool | getFirsCommand (DtCommandPriorityMultimap::iterator &itrToProcess) |
Protected Member Functions inherited from DtReaderWriter | |
| virtual void | bindToRwAsVariable (const DtReaderWriter *rw) |
| DtOsgEarthTerrainSourcePager::DtOsgEarthTerrainSourcePager | ( | DtVantageTerrainEngine * | terrainEngine, |
| osgEarth::MapNode * | mapNode | ||
| ) |
|
virtual |
|
virtual |
Creates and returns a DtOsgEarthTerrainSourceTracker.
Implements DtTerrainSourcePager.
|
virtual |
Sets/gets the intersect fidelity for this pager.
|
virtual |
Sets/gets the intersect fidelity for this pager.
|
virtual |
Initializes pager. Loads data from cutout cache.
Reimplemented from DtTerrainSourcePager.
|
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.
Reimplemented from DtTerrainSourcePager.
|
virtual |
Calls pageIntile for a single tile in the list and then removes it from the list.
| tileIds | List of tileIds to page in. When a tile is successfully paged in, it is removed from this list. |
| intersectId | Optional intersectId to seed new tiles with. |
|
virtual |
Pages out the requested tiles, removes the corresponding collision objects from the collision world, decrements the terrainEngine's triangle count, and decrements the terrainEngine's pending removal command count.
| tilesToRemove | List of tileIds to page out. |
|
virtual |
Updates the DtOsgEarthTerrainSourceTracker.
Implements DtTerrainSourcePager.
|
virtual |
Calls processCommandQueue to add new commands into the priority-sorted command map. Then returns the priority of the highest-priority pending command.
Reimplemented from DtTerrainSourcePager.
Called by createTerrainSourceTracker. Determines lod to use for terrain source tracker, based on myMapNode.
|
virtual |
osgearth terrain options.
|
virtual |
Find all the tiles that intersect the geometry which are not paged in.
| unsigned DtOsgEarthTerrainSourcePager::reloadQueuedPages | ( | ) |
Reloads the queued pages.
|
virtual |
Reimplemented from DtTerrainSourcePager.
|
static |
|
virtual |
set a terrain pager name to differentiate them
|
protectedvirtual |
Looks for pages that cover the extent that haven't been loaded and queues them to be loaded.
|
protectedvirtual |
Reloads a tile and keeps track of cratering events that affect the tile.
| tileKey | the TileKey of the tile to reload |
| isRemoval | true if the crater is being removed, false if its being added |
| numEvents | the number of craters for the reload |
|
protectedvirtual |
Finds the TileKey of the first parent key for tiledata that is loaded.
| firstParentTileKey | the first parent key that was found |
| tileKey | the key looking for the first parent |
|
protectedvirtual |
Modifies the mask extents of the first parent tile so that intersection calls will use the hi-res tile data instead.
| tileData | the hi-res tile data to add to the mask extents for the parent tile |
| isRemoval | is set to true if the crater is being removed else set to false if its being added return true if a parent was found, false otherwise |
|
protectedvirtual |
Creates the requested osg heightfield, adds the heightfield as a collision shape to the bullet collision world, and adds the record of the tile to the pager's terrainSourceTracker for tracking and paging out purposes.
| tileIds | The tileKey to create heightfield for. |
| intersectId | Optional parameter to create the tiles with a starting "lastUsed" value of intersectId. |
|
protectedvirtual |
Removes the heightfield and the corresponding collision object from the collision world. Also removes the tracker's reference to this tile, decrements the terrainEngine's number of triangles, and number of pending page out commands.
| pageOutSubtiles | If true, then all subtiles will be paged out as well. |
|
protectedvirtual |
Sets up and returns a new DtTileData object from an osgearth tile model.
| tilekey | Tile to create. |
| intersectId | IntersectId to seed the tileData with for page-out priority. |
| createIfAlreadyLoaded | setting to true forces it create tile data regardless if it is already loaded. |
|
protectedvirtual |
Sets up and returns a new DtTileData object from a heightfield.
| tilekey | Tile to create. |
| intersectId | IntersectId to seed the tileData with for page-out priority. |
| heightfield | Elevation data for tile. |
|
protectedvirtual |
Sets up and returns a new DtTileData object from geometry.
| tilekey | Tile to create. |
| intersectId | IntersectId to seed the tileData with for page-out priority. |
| geometry | Geometry data for tile. |
|
protectedvirtual |
Adds a configured tile data object to the terrain.
| tilekey | Key for the area which is being enabled on the tile. This is not necessarily the same as the key for the tile model in the tile data. If it is not then it is a descendant of that key. |
| tile | Tile data to add. The same tile data may be added multiple times, each time with different tilekey parameter because different subareas of the tile data are being paged in. This is because if we page in tile data due to intersections in one area, there may be higher resolution data in other areas so we have to keep track of which areas have been checked. This is all done in createTileDataFromTileModel. |
|
protectedvirtual |
Used when a tile cannot be created by osgEarth's tileBuilder. Creates a Terrain Tile with all heights at 0.
|
protectedvirtual |
Called from addTile to process and add mask geometry to collision world.
|
protectedvirtual |
|
protected |
Associated Tracker.
|
protected |
Used when a heightfield cannot be created.
|
protected |
Which intersection fidelity this pager is setup for.
|
protected |
Tbb arena to limit number of threads.
|
protected |
terrain pager name
|
protected |
If you set the environment variable "UseLegacyFindIntersection=true" it will use the old recursive FindIntersection.
|
protected |
life map layer in the map node
|
protected |
Life map coverage layer factory.
|
protected |
Dynamic terrain Life map coverage layer factory.
|
protected |
Dynamic terrain coverage layer.