![]() |
VR-Forces Developer's Guide
|
2D Quad tree based on lat/lon, splits when a max model count is reached
Classes | |
| struct | GroupedModelInfo |
| struct | ModelInfo |
Public Member Functions | |
| DtModelMergerCell (double lat, double lon, double maxLat, double maxLon, double alt, int lod, DtCoordinateSystem &coordinateSystem, osg::ref_ptr< osgEarth::SpatialReference > wgs84) | |
| virtual | ~DtModelMergerCell () |
| virtual bool | addModel (ModelInfo &model) |
| virtual std::array < DtModelMergerCell *, 4 > & | subCells () |
| virtual std::vector< ModelInfo > & | models () |
| virtual osg::ref_ptr< osg::Group > | modelsGroupNode () |
| virtual osg::ref_ptr < osg::MatrixTransform > | cellTransform () |
| virtual void | setCacheDirectory (std::string &cacheDir) |
| virtual void | setMappingsCacheDirectory (std::string &mappingsDir) |
| virtual void | setLatLonLodString (std::string &str) |
| virtual const std::string & | cacheDirectory () const |
| virtual void | runDiskWriteOps () |
| virtual void | setOverwrite (bool overwrite) |
| virtual void | setIsRootCell (bool isRoot) |
| virtual void | setMappingsMap (std::unordered_map< std::string, std::string > *map) |
| virtual void | setInfosMap (std::unordered_map< std::string, GroupedModelInfo > *map) |
| virtual void | setDbOptions (osg::ref_ptr< osgDB::Options > options) |
| virtual void | printMinCellStats () |
| virtual void | setMaxModelCount (size_t count) |
| virtual size_t | maxModelCount () const |
| virtual void | setMinimumCellSize (double size) |
| virtual double | mimimumCellSize () const |
| virtual double | lat () const |
| virtual double | lon () const |
| virtual double | maxLat () const |
| virtual double | maxLon () const |
| virtual double | alt () const |
| virtual int | lod () const |
Protected Member Functions | |
| virtual void | initCellCoordinates () |
| virtual void | createSubCells () |
| virtual bool | isPointInCell (const osg::Vec2d &point) |
| virtual void | buildTransformForCell () |
| virtual void | writeModelsGroupNodeToDisk () |
| virtual void | writeGroupedModelInfosToDisk () |
| virtual void | writeMappingsToDisk () |
| virtual void | runOptimisationsOnNode (osg::ref_ptr< osg::Group > group) |
Protected Attributes | |
| double | myLat |
| double | myLon |
| double | myMaxLat |
| double | myMaxLon |
| double | myAlt |
| double | myMinSize |
| int | myLod |
| bool | mySubCellsCreated |
| bool | myBeenVisualised |
| bool | myOverwrite |
| bool | myIsRootCell |
| bool | myIsMinSize |
| std::array< DtModelMergerCell *, 4 > | mySubCells |
| osg::ref_ptr < osgEarth::SpatialReference > | myWgs84 |
| DtCoordinateSystem & | myCoordinateSystem |
| DtGeoReference | myShapeFileGeoRef |
| std::vector< osg::Vec2 > | myCellCoordinates |
| osg::Vec2 | myCellSizeInMetres |
| std::vector< ModelInfo > | myModels |
| osg::ref_ptr< osg::Group > | myModelsGroupNode |
| osg::ref_ptr < osg::MatrixTransform > | myCellTransform |
| size_t | myMaxModelCount |
| std::string | myCacheDirectory |
| std::string | myMappingsCacheDirectory |
| std::string | myLatLonLodString |
| std::unordered_map < std::string, std::string > * | myDatabaseFileToGroupNodeFileMap |
| std::unordered_map < std::string, GroupedModelInfo > * | myGroupedModelToInfoMap |
| osg::ref_ptr< osgDB::Options > | myDbOptions |
| makVrv::DtModelMergerCell::DtModelMergerCell | ( | double | lat, |
| double | lon, | ||
| double | maxLat, | ||
| double | maxLon, | ||
| double | alt, | ||
| int | lod, | ||
| DtCoordinateSystem & | coordinateSystem, | ||
| osg::ref_ptr< osgEarth::SpatialReference > | wgs84 | ||
| ) |
CTOR.
|
virtual |
DTOR.
Add a model to the cell, creates subcells and places current models in sub cells if sub cells are created.
|
virtual |
Set / Get the max model count. Cell creates four sub cells when max count is hit. Default 50.
|
virtual |
Set / Get the max model count. Cell creates four sub cells when max count is hit. Default 50.
|
virtual |
Set / Get the minumim cell size, won't subdivide once reached Default 200m The minimum cell size is set in metres, it is the in param squared, size * size A minimum size is required to stop the quad tree subdividing infinitely based on the max model count. As the quad tree splits on lat lon degrees, the tree can get into a state where myLat == myMaxLat, and therefore has a size of zero, model locations will not pass DtModelMergerCell::isPointInCell for cell size of zero. The size of the cell is calculated in topo metres from the centre of the cell, and compared against myMinSize.
|
virtual |
Set / Get the minumim cell size, won't subdivide once reached Default 200m The minimum cell size is set in metres, it is the in param squared, size * size A minimum size is required to stop the quad tree subdividing infinitely based on the max model count. As the quad tree splits on lat lon degrees, the tree can get into a state where myLat == myMaxLat, and therefore has a size of zero, model locations will not pass DtModelMergerCell::isPointInCell for cell size of zero. The size of the cell is calculated in topo metres from the centre of the cell, and compared against myMinSize.
|
virtual |
Getters for cell coordinates.
|
virtual |
Getters for cell coordinates.
|
virtual |
Getters for cell coordinates.
|
virtual |
Getters for cell coordinates.
|
virtual |
Getters for cell coordinates.
|
virtual |
Getters for cell coordinates.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Write grouped models to disk, including mappings, and info files calls writeGroupedModelInfosToDisk.
|
virtual |
Set whether new grouped medfs should overwrite those on disk.
|
virtual |
If this cell is the root cell create the mappings maps Sets myRootCell.
|
virtual |
Set by root cell.
|
virtual |
|
virtual |
|
virtual |
Info method, prints info about the cell if it is min size cell Size, number of models, etc.
|
protectedvirtual |
Create cell based on constructor supplied lat/lon.
|
protectedvirtual |
Create four DtModelMergerCell subcells.
|
protectedvirtual |
Check if point is inside cell.
|
protectedvirtual |
Creat the global myCellTransform based on the lat lon alt.
|
protectedvirtual |
|
protectedvirtual |
Write grouped model info to disk.
|
protectedvirtual |
Write myDatabaseFileToGroupNodeFileMap to disk Only root cell writes.
|
protectedvirtual |
Attempt to optimise the in param group node.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Minimum size that the cell can be in metres, x and y Default 200.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Lat Lon degrees.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |