![]() |
VR-Forces Developer's Guide
|
DtOsgEarthBaseGroundCoverSourcePager is a derived terrainSourcePager and based class for common code between DtosgEarthGroundCoverSourcePager and DtosgEarthVegetationLayerPager that handles a streaming terrain source.

Public Types | |
| typedef std::vector < osg::ref_ptr < osgEarth::Feature > > | FeatureVector |
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 )() |
Public Member Functions | |
| DtOsgEarthBaseGroundCoverSourcePager (DtVantageTerrainEngine *terrainEngine, osgEarth::MapNode *mapNode) | |
| virtual | ~DtOsgEarthBaseGroundCoverSourcePager () override |
| virtual bool | init () override=0 |
| virtual void | tick () override |
| virtual void | updatePageTracker (DtTerrainIntersectIDType intersectId=0) override |
| virtual void | findMissingTiles (const DtTerrainPagingGeometryPtr &geometry, DtTileKeyList &tiles) const |
| virtual bool | pageInTiles (DtTileKeyList &tileIds, DtTerrainIntersectIDType intersectId=0) |
| virtual bool | pageOutTiles (const DtTileKeyList &tilesToRemove) |
| unsigned | reloadQueuedPages () |
Public Member Functions inherited from DtTerrainSourcePager | |
| DtTerrainSourcePager (DtVantageTerrainEngine *terrainEngine, osgEarth::MapNode *mapNode) | |
| virtual | ~DtTerrainSourcePager () override |
| 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 * | createTerrainSourceTracker (DtVantageTerrainEngine *)=0 |
| virtual DtTerrainSourceTracker * | terrainSourceTracker () |
| virtual int | highestPriorityPendingWork () |
| virtual void | processCommandQueue () |
| virtual void | setCurrentTime (const double ¤tTime) |
| virtual unsigned long | numTriangles () const |
| virtual unsigned long | numPendingCommands () const |
| virtual std::map< int, unsigned long > | numPendingCommandsByPriority () 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 DtString | type () const =0 |
| virtual unsigned | queuePageReloadsWithinExtent (const osgEarth::GeoExtent &extent, const DtUUID &dynamicUuid, bool isRemoval=false) |
| virtual void | clearCutoutCache () |
| virtual void | clearTerrainEngineReference () |
Public Member Functions inherited from DtTerrainInterfaceConfig | |
| DtTerrainInterfaceConfig (const std::string &matchPattern="") | |
| DtTerrainInterfaceConfig (const DtTerrainInterfaceConfig &orig) | |
| 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 |
| virtual DtString | prettyPrint () const override |
| virtual void | setName (const DtString &) override |
| 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) |
Protected Member Functions | |
| virtual bool | pageInTile (const osgEarth::TileKey &tileKey, DtTerrainIntersectIDType intersectId=0)=0 |
| virtual bool | pageOutTile (const osgEarth::TileKey &tileKey)=0 |
| virtual void | addTile (const osgEarth::TileKey &tilekey, const std::shared_ptr< DtTileData > &tile)=0 |
| virtual bool | reloadTile (const osgEarth::TileKey &tileKey, bool isRemoval=false, unsigned numEvents=1)=0 |
| virtual void | addEmptyTile (const osgEarth::TileKey &tilekey, DtTerrainIntersectIDType intersectId=0) |
Protected Member Functions inherited from DtTerrainSourcePager | |
| virtual unsigned int | addTerrain (const osg::ref_ptr< osg::Node > &node, DtVrfSimTerrainProcessor &, const char *debugWhoisCalling="unknown", const char *defaulSoilType="") |
| 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) |
| typedef std::vector<osg::ref_ptr<osgEarth::Feature> > DtOsgEarthBaseGroundCoverSourcePager::FeatureVector |
| DtOsgEarthBaseGroundCoverSourcePager::DtOsgEarthBaseGroundCoverSourcePager | ( | DtVantageTerrainEngine * | terrainEngine, |
| osgEarth::MapNode * | mapNode | ||
| ) |
CTOR.
|
overridevirtual |
DTOR.
|
overridepure virtual |
Called after pager is configured.
Reimplemented from DtTerrainSourcePager.
Implemented in DtOsgEarthVegetationLayerSourcePager, and DtOsgEarthGroundCoverSourcePager.
|
overridevirtual |
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.
|
overridevirtual |
Updates the DtOsgEarthTerrainSourceTracker.
Implements DtTerrainSourcePager.
|
virtual |
Find all the tiles that intersect the geometry which are not paged in.
|
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. |
| unsigned DtOsgEarthBaseGroundCoverSourcePager::reloadQueuedPages | ( | ) |
Reloads the queued pages.
|
protectedpure virtual |
Load a ground cover terrain patch in memory.
Implemented in DtOsgEarthVegetationLayerSourcePager, and DtOsgEarthGroundCoverSourcePager.
|
protectedpure virtual |
Unload a ground cover terrain patch.
Implemented in DtOsgEarthVegetationLayerSourcePager, and DtOsgEarthGroundCoverSourcePager.
|
protectedpure virtual |
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. |
Implemented in DtOsgEarthVegetationLayerSourcePager, and DtOsgEarthGroundCoverSourcePager.
|
protectedpure virtual |
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 |
Implemented in DtOsgEarthVegetationLayerSourcePager, and DtOsgEarthGroundCoverSourcePager.
|
protectedvirtual |
Used when a tile cannot be created by osgEarth's tileBuilder. Creates a Terrain Tile with all heights at 0.
|
protected |
Associated Tracker.
|
protected |
Mutex for creating tree geometry.
|
protected |
Tbb arena to limit number of threads.