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

Classes | |
| class | treemodel |
Public Member Functions | |
| DtOsgEarthGroundCoverSourcePager (DtVantageTerrainEngine *terrainEngine, osgEarth::MapNode *mapNode) | |
| virtual | ~DtOsgEarthGroundCoverSourcePager () |
| virtual bool | init () |
| virtual void | tick () |
| unsigned | reloadQueuedPages () |
| virtual bool | pageInTiles (DtTileKeyList &tileIds, DtTerrainIntersectIDType intersectId=0) |
| virtual bool | pageOutTiles (const DtTileKeyList &tilesToRemove) |
| virtual DtTerrainSourceTracker * | createTerrainSourceTracker (DtVantageTerrainEngine *) |
| virtual void | updatePageTracker (DtTerrainIntersectIDType intersectId=0) |
| virtual void | setGroundCoverLayer (osg::ref_ptr< osgEarth::Splat::GroundCoverLayer > gclayer) |
| virtual unsigned int | groundCoverLod () const |
| virtual void | findMissingTiles (const DtTerrainPagingGeometryPtr &geometry, DtTileKeyList &tiles) const |
| unsigned | reloadPagesWithinExtent (const osgEarth::GeoExtent &extent, bool isRemoval=false) |
| virtual unsigned | queuePageReloadsWithinExtent (const osgEarth::GeoExtent &extent, const DtUUID &dynamicUuid, bool isRemoval=false) |
| virtual osg::ref_ptr < osg::MatrixTransform > | createTree (const osg::ref_ptr< osgEarth::Feature > &feature) |
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 int | highestPriorityPendingWork () |
| 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) |
| 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 | wasUpdatedSince (DtTime t) 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 Types | |
| typedef std::map< int, treemodel > | DtTreeMap |
Protected Types inherited from DtTerrainSourcePager | |
| typedef boost::geometry::model::point < double, 2, boost::geometry::cs::geographic < boost::geometry::degree > > | DtDynamicTerrainRtreeCoord |
| typedef boost::geometry::model::box < DtDynamicTerrainRtreeCoord > | DtDynamicTerrainRtreeBox |
| typedef std::pair < DtDynamicTerrainRtreeBox, boost::shared_ptr < DynamicTerrainNode > > | DtDynamicTerrainRtreeValue |
| typedef boost::geometry::index::rtree < DtDynamicTerrainRtreeValue, boost::geometry::index::quadratic< 16 > > | DtDynamicTerrainRtree |
| typedef std::set < DtPendingTileKeyReload > | DtPendingTileKeyReloadSet |
| typedef tbb::spin_rw_mutex | Mutex |
Protected Member Functions | |
| virtual bool | reloadTile (const osgEarth::TileKey &tileKey, bool isRemoval=false, unsigned numEvents=1) |
| virtual boost::shared_ptr < DtTileData > | createTileDataFromGroundCover (const osgEarth::TileKey &tilekey, DtTerrainIntersectIDType intersectId, bool createIfAlreadyLoaded=false) const |
| virtual bool | pageInTile (const osgEarth::TileKey &tileKey, DtTerrainIntersectIDType intersectId=0) |
| virtual bool | pageOutTile (const osgEarth::TileKey &tileKey) |
| virtual void | addTile (const osgEarth::TileKey &tilekey, const boost::shared_ptr< DtTileData > &tile) |
| 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") |
| 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) |
|
protected |
| DtOsgEarthGroundCoverSourcePager::DtOsgEarthGroundCoverSourcePager | ( | DtVantageTerrainEngine * | terrainEngine, |
| osgEarth::MapNode * | mapNode | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Called after pager is configured.
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.
| unsigned DtOsgEarthGroundCoverSourcePager::reloadQueuedPages | ( | ) |
Reloads the queued pages.
|
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 |
Creates and returns a DtOsgEarthTerrainSourceTracker.
Implements DtTerrainSourcePager.
|
virtual |
Updates the DtOsgEarthTerrainSourceTracker.
Implements DtTerrainSourcePager.
|
virtual |
Set the ground layer associated to the pager.
only lod that the tracker will generate.
|
virtual |
Find all the tiles that intersect the geometry which are not paged in.
| unsigned DtOsgEarthGroundCoverSourcePager::reloadPagesWithinExtent | ( | const osgEarth::GeoExtent & | extent, |
| bool | isRemoval = false |
||
| ) |
Reloads all pages that are already loaded within the extent.
| extent | geodetic extent of the dynamic feature being added or removed |
| isRemoval | boolean used to determine if the reload is due to a removal or insertion of a dynamic feature |
|
virtual |
Reimplemented from DtTerrainSourcePager.
|
virtual |
Create an osg tree outline for the simEngine.
|
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 |
Sets up and returns a new DtTileData object from an osgEarth ground cover.
| 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 |
Load a ground cover terrain patch in memory.
|
protectedvirtual |
Unload a ground cover terrain patch.
|
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.
|
protected |
Tree Map.
|
protected |
Used to extract procedural trees/shrub/ect.
|
protected |
ground cover of the pager
|
protected |
Associated Tracker.
|
mutableprotected |
Mutex for the tile reload when dynamic terrain gets modify.
|
protected |
Mutex for creating tree geometry.
|
protected |
Tbb arena to limit number of threads.
|
protected |
list of error messages