![]() |
VR-Forces 4.0.4 Class Documentation
|
The DtTdbManager class is intended to be used as a single point of interface to a terrain database, and to provide an "administrative" interface to that terrain database. More...
Public Member Functions | |
| DtTdbManager () | |
| Default constructor. | |
| DtTdbManager (DtTerrainDbFactory *fac) | |
| Constructor receiving the terrainDbFactory to be used to load terrains/papermaps. | |
| virtual | ~DtTdbManager () |
| Destructor. | |
| virtual bool | load (const DtFilename &filename, const DtList &searchPaths, DtString *errorString=0) |
| Loads a database by filename. | |
| virtual bool | load (const DtFilename &filename, const DtFilename &path=DtFilename::nullFilename(), DtString *errorString=0) |
| Specify a path not derived from mtpFile. | |
| virtual bool | load (DtTdbMetafile &tdbMeta, const DtFilename &path=DtFilename::nullFilename(), DtString *errorString=0) |
| Loads a database by metafile. | |
| virtual Coordinate_System * | coordinateSystemFrom (const DtFilename &, const DtFilename &path=DtFilename::nullFilename(), DtString *errorString=0) |
| virtual bool | hasOptionalFlags (int flags, const DtFilename &, const DtFilename &path=DtFilename::nullFilename(), DtString *errorString=0) |
| virtual bool | loadPapermaps (DtTdbMetafile &tdbMeta, DtTerrainDatabase *db, const DtFilename &path=DtFilename::nullFilename()) |
| Loads the only the papermaps using the coordinate system of the terrain database given If no database is given, it interally creates a temporary, empty db and uses its coordinate system. | |
| virtual bool | save (const DtFilename &filename) |
| Saves a database by filename. | |
| virtual bool | exportPoly (const DtFilename &filename) |
| Exports database polygons to a shapefile. | |
| virtual bool | createDatabaseFromExtent (const DtExtent &, Coordinate_System *coordSys=0) |
| Creates a simple terrain database from the supplied extent. | |
| virtual bool | unload () |
| Unloads the current database without saving it. | |
| virtual bool | selectTerrain (const DtVector &localLocation, DtTerrainSelection &terrainSelection) |
| virtual bool | selectTerrain (double lat, double lon, DtTerrainSelection &terrainSelection) |
| virtual bool | selectTerrain (const DtExtent &extent, DtTerrainSelection &terrainSelection, bool selectInclusive=true) |
| virtual bool | selectTerrain (const DtNetworkElement &networkElement, DtTerrainSelection &terrainSelection, bool selectInclusive=true) |
| virtual bool | processDatabase (DtTerrainDatabase &terrainDatabase, const DtGdbProcessingMetafileRecord &postProcessingRecord) const |
| Processes the specified terrain database, as configured in the postProcessing record. | |
| virtual void | setTerrainFactory (DtTerrainDbFactory *fac) |
| Get/Set the terrainDbFactory. | |
| virtual DtTerrainDbFactory * | terrainDbFactory () |
| virtual const DtTerrainDatabase * | terrainDatabase () const |
| Get/Set the terrain database. | |
| virtual DtTerrainDatabase * | terrainDatabase () |
| virtual void | setTerrainDatabase (DtTerrainDatabase *t) |
| virtual const DtPaperMapDatabase * | paperMapDatabase () const |
| Get/Set the paper map database. | |
| virtual DtPaperMapDatabase * | paperMapDatabase () |
| virtual void | setPaperMapDatabase (DtPaperMapDatabase *p) |
| virtual DtTerrainDatabase * | createTerrainDatabase () |
| Returns a newly allocated terrain database. Override this method to return your special subclass of the terrain database. | |
| void | setCheckImageForValidityCallback (DtCheckImageForValidityCallbackFcn, void *) |
| Sets callbacks that will be used to see if image can be loaded. Return true to load image and false to not. | |
| DtCheckImageForValidityCallbackFcn | checkImageForValidityCallback (void *&userPtr) const |
| virtual bool | loadFor3DVisualization (const DtFilename &filename, Coordinate_System *targetCoordinateSystem=0, DtString *errorString=0) |
| Loads a database by filename, specifically for visualization in a 3D viewer. | |
| virtual bool | loadFeatureDataIntoTerrain (const DtFilename &featureDataFilename, DtTerrainDatabase &terrainDb) |
| virtual DtString | loadedTerrainFilename () const |
| virtual void | setFullyLoad (bool) |
| virtual bool | fullyLoad () const |
Static Public Member Functions | |
| static DtTdbManager * | create (DtTerrainDbFactory *) |
| Static creator. | |
Protected Attributes | |
| DtTerrainDbFactory * | myTerrainDbFactory |
| DtTerrainDatabase * | myTerrainDatabase |
| DtPaperMapDatabase * | myPaperMapDatabase |
| DtCheckImageForValidityCallbackFcn | myCheckImageForValidityCallback |
| void * | myCheckImageForValidityCallbackData |
| DtString | myLoadedTerrainFilename |
| bool | myFullyLoad |
Private Member Functions | |
| DtTdbManager (const DtTdbManager &orig) | |
| Copy constructor and Assignment operator unimplemented. | |
| DtTdbManager & | operator= (const DtTdbManager &rhs) |
The DtTdbManager class is intended to be used as a single point of interface to a terrain database, and to provide an "administrative" interface to that terrain database.
The "administrative" interface includes all operations that affect the terrain database directly as opposed to those that model interactions with a terrain database. For instance, loading, post-processing, and saving a terrain database are all administrative operations. However, performing an intersection to determine altitude at a point and other properties specific to that area of the terrain in question is really modeling an interaction with the terrain.
Default constructor.
Constructor receiving the terrainDbFactory to be used to load terrains/papermaps.
| virtual DtTdbManager::~DtTdbManager | ( | ) | [virtual] |
Destructor.
| DtTdbManager::DtTdbManager | ( | const DtTdbManager & | orig | ) | [private] |
Copy constructor and Assignment operator unimplemented.
This class is not copyable or assignable.
| DtTdbManager& DtTdbManager::operator= | ( | const DtTdbManager & | rhs | ) | [private] |
| virtual bool DtTdbManager::load | ( | const DtFilename & | filename, |
| const DtList & | searchPaths, | ||
| DtString * | errorString = 0 |
||
| ) | [virtual] |
Loads a database by filename.
The searchPaths parameter is passed on to DtTerrainDbFactory::loadDatabase (searchPaths is a list of DtString*s, holding a list of locations in which to search for the given fileName on the file system)
| virtual bool DtTdbManager::load | ( | const DtFilename & | filename, |
| const DtFilename & | path = DtFilename::nullFilename(), |
||
| DtString * | errorString = 0 |
||
| ) | [virtual] |
Specify a path not derived from mtpFile.
| virtual bool DtTdbManager::load | ( | DtTdbMetafile & | tdbMeta, |
| const DtFilename & | path = DtFilename::nullFilename(), |
||
| DtString * | errorString = 0 |
||
| ) | [virtual] |
Loads a database by metafile.
| virtual Coordinate_System* DtTdbManager::coordinateSystemFrom | ( | const DtFilename & | , |
| const DtFilename & | path = DtFilename::nullFilename(), |
||
| DtString * | errorString = 0 |
||
| ) | [virtual] |
| virtual bool DtTdbManager::hasOptionalFlags | ( | int | flags, |
| const DtFilename & | , | ||
| const DtFilename & | path = DtFilename::nullFilename(), |
||
| DtString * | errorString = 0 |
||
| ) | [virtual] |
| virtual bool DtTdbManager::loadPapermaps | ( | DtTdbMetafile & | tdbMeta, |
| DtTerrainDatabase * | db, | ||
| const DtFilename & | path = DtFilename::nullFilename() |
||
| ) | [virtual] |
Loads the only the papermaps using the coordinate system of the terrain database given If no database is given, it interally creates a temporary, empty db and uses its coordinate system.
| virtual bool DtTdbManager::save | ( | const DtFilename & | filename | ) | [virtual] |
Saves a database by filename.
| virtual bool DtTdbManager::exportPoly | ( | const DtFilename & | filename | ) | [virtual] |
Exports database polygons to a shapefile.
| virtual bool DtTdbManager::createDatabaseFromExtent | ( | const DtExtent & | , |
| Coordinate_System * | coordSys = 0 |
||
| ) | [virtual] |
Creates a simple terrain database from the supplied extent.
The coordinate system used will be the flat earth coordinate system (unless another is supplied). Note that is a coordinate system is supplied, the terrain database will take control of it
| virtual bool DtTdbManager::unload | ( | ) | [virtual] |
Unloads the current database without saving it.
| virtual bool DtTdbManager::processDatabase | ( | DtTerrainDatabase & | terrainDatabase, |
| const DtGdbProcessingMetafileRecord & | postProcessingRecord | ||
| ) | const [virtual] |
Processes the specified terrain database, as configured in the postProcessing record.
Usually used to perform operations such as eliminating duplicate vertices and surfaces, or altering the resolution of the spatial subdivision.
| virtual void DtTdbManager::setTerrainFactory | ( | DtTerrainDbFactory * | fac | ) | [virtual] |
Get/Set the terrainDbFactory.
| virtual DtTerrainDbFactory* DtTdbManager::terrainDbFactory | ( | ) | [virtual] |
| virtual const DtTerrainDatabase* DtTdbManager::terrainDatabase | ( | ) | const [virtual] |
Get/Set the terrain database.
| virtual DtTerrainDatabase* DtTdbManager::terrainDatabase | ( | ) | [virtual] |
| virtual void DtTdbManager::setTerrainDatabase | ( | DtTerrainDatabase * | t | ) | [virtual] |
| virtual const DtPaperMapDatabase* DtTdbManager::paperMapDatabase | ( | ) | const [virtual] |
Get/Set the paper map database.
| virtual DtPaperMapDatabase* DtTdbManager::paperMapDatabase | ( | ) | [virtual] |
| virtual void DtTdbManager::setPaperMapDatabase | ( | DtPaperMapDatabase * | p | ) | [virtual] |
| static DtTdbManager* DtTdbManager::create | ( | DtTerrainDbFactory * | ) | [static] |
Static creator.
| virtual DtTerrainDatabase* DtTdbManager::createTerrainDatabase | ( | ) | [virtual] |
Returns a newly allocated terrain database. Override this method to return your special subclass of the terrain database.
Sets callbacks that will be used to see if image can be loaded. Return true to load image and false to not.
| DtCheckImageForValidityCallbackFcn DtTdbManager::checkImageForValidityCallback | ( | void *& | userPtr | ) | const |
| virtual bool DtTdbManager::loadFor3DVisualization | ( | const DtFilename & | filename, |
| Coordinate_System * | targetCoordinateSystem = 0, |
||
| DtString * | errorString = 0 |
||
| ) | [virtual] |
Loads a database by filename, specifically for visualization in a 3D viewer.
Incoming filename must either be a shape vector data file (.shp) or a gdb file. If targetCoordinateSystem is non-NULL, transforms resulting terrain database into that coordinate system.
| virtual bool DtTdbManager::loadFeatureDataIntoTerrain | ( | const DtFilename & | featureDataFilename, |
| DtTerrainDatabase & | terrainDb | ||
| ) | [virtual] |
| virtual DtString DtTdbManager::loadedTerrainFilename | ( | ) | const [virtual] |
| virtual void DtTdbManager::setFullyLoad | ( | bool | ) | [virtual] |
| virtual bool DtTdbManager::fullyLoad | ( | ) | const [virtual] |
DtTerrainDbFactory* DtTdbManager::myTerrainDbFactory [protected] |
DtTerrainDatabase* DtTdbManager::myTerrainDatabase [protected] |
DtPaperMapDatabase* DtTdbManager::myPaperMapDatabase [protected] |
void* DtTdbManager::myCheckImageForValidityCallbackData [protected] |
DtString DtTdbManager::myLoadedTerrainFilename [protected] |
bool DtTdbManager::myFullyLoad [protected] |