Implemented support for overriding the coordinate system and geo transform
using in generate of databases.
This commit is contained in:
@@ -139,64 +139,57 @@ int main( int argc, char **argv )
|
|||||||
argumentRead = false;
|
argumentRead = false;
|
||||||
|
|
||||||
std::string def;
|
std::string def;
|
||||||
|
osgTerrain::DataSet::Source* source = 0;
|
||||||
|
|
||||||
if (arguments.read(pos, "--cs",def))
|
if (arguments.read(pos, "--cs",def))
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
currentCS = !def.empty() ? SanitizeSRS(def.c_str()) : "";
|
currentCS = !def.empty() ? SanitizeSRS(def.c_str()) : "";
|
||||||
std::cout<<"--cs "<<currentCS<<std::endl;
|
std::cout<<"--cs "<<currentCS<<std::endl;
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "--identity"))
|
||||||
if (arguments.read(pos, "--identity"))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
geoTransformSet = false;
|
geoTransformSet = false;
|
||||||
geoTransform.makeIdentity();
|
geoTransform.makeIdentity();
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "--xx",geoTransform(0,0)))
|
||||||
if (arguments.read(pos, "--xx",geoTransform(0,0)))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
geoTransformSet = true;
|
geoTransformSet = true;
|
||||||
std::cout<<"--xs "<<geoTransform(0,0)<<std::endl;
|
std::cout<<"--xs "<<geoTransform(0,0)<<std::endl;
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "--xt",geoTransform(3,0)))
|
||||||
if (arguments.read(pos, "--xt",geoTransform(3,0)))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
geoTransformSet = true;
|
geoTransformSet = true;
|
||||||
std::cout<<"--xo "<<geoTransform(3,0)<<std::endl;
|
std::cout<<"--xo "<<geoTransform(3,0)<<std::endl;
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "--yy",geoTransform(1,1)))
|
||||||
if (arguments.read(pos, "--yy",geoTransform(1,1)))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
geoTransformSet = true;
|
geoTransformSet = true;
|
||||||
std::cout<<"--yy "<<geoTransform(1,1)<<std::endl;
|
std::cout<<"--yy "<<geoTransform(1,1)<<std::endl;
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "--yt",geoTransform(3,1)))
|
||||||
if (arguments.read(pos, "--yt",geoTransform(3,1)))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
geoTransformSet = true;
|
geoTransformSet = true;
|
||||||
std::cout<<"--yt "<<geoTransform(3,1)<<std::endl;
|
std::cout<<"--yt "<<geoTransform(3,1)<<std::endl;
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "--zz",geoTransform(2,2)))
|
||||||
if (arguments.read(pos, "--zz",geoTransform(2,2)))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
geoTransformSet = true;
|
geoTransformSet = true;
|
||||||
std::cout<<"--zz "<<geoTransform(2,2)<<std::endl;
|
std::cout<<"--zz "<<geoTransform(2,2)<<std::endl;
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "--zt",geoTransform(3,2)))
|
||||||
if (arguments.read(pos, "--zt",geoTransform(3,2)))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
geoTransformSet = true;
|
geoTransformSet = true;
|
||||||
std::cout<<"--zt "<<geoTransform(3,2)<<std::endl;
|
std::cout<<"--zt "<<geoTransform(3,2)<<std::endl;
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "-d",filename))
|
||||||
osgTerrain::DataSet::Source* source = 0;
|
|
||||||
if (arguments.read(pos, "-d",filename))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
|
|
||||||
@@ -207,8 +200,7 @@ int main( int argc, char **argv )
|
|||||||
source = new osgTerrain::DataSet::Source(osgTerrain::DataSet::Source::HEIGHT_FIELD,filename);
|
source = new osgTerrain::DataSet::Source(osgTerrain::DataSet::Source::HEIGHT_FIELD,filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "-t",filename))
|
||||||
if (arguments.read(pos, "-t",filename))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
|
|
||||||
@@ -218,8 +210,7 @@ int main( int argc, char **argv )
|
|||||||
source = new osgTerrain::DataSet::Source(osgTerrain::DataSet::Source::IMAGE,filename);
|
source = new osgTerrain::DataSet::Source(osgTerrain::DataSet::Source::IMAGE,filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "-m",filename))
|
||||||
if (arguments.read(pos, "-m",filename))
|
|
||||||
{
|
{
|
||||||
argumentRead = true;
|
argumentRead = true;
|
||||||
|
|
||||||
@@ -229,6 +220,27 @@ int main( int argc, char **argv )
|
|||||||
source = new osgTerrain::DataSet::Source(osgTerrain::DataSet::Source::MODEL,filename);
|
source = new osgTerrain::DataSet::Source(osgTerrain::DataSet::Source::MODEL,filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (arguments.read(pos, "-o",filename))
|
||||||
|
{
|
||||||
|
std::cout<<"-o "<<filename<<std::endl;
|
||||||
|
|
||||||
|
argumentRead = true;
|
||||||
|
|
||||||
|
std::string path = osgDB::getFilePath(filename);
|
||||||
|
std::string base = path.empty()?osgDB::getStrippedName(filename):
|
||||||
|
path +'/'+ osgDB::getStrippedName(filename);
|
||||||
|
std::string extension = '.'+osgDB::getLowerCaseFileExtension(filename);
|
||||||
|
|
||||||
|
dataset->setDestinationTileBaseName(base);
|
||||||
|
dataset->setDestinationTileExtension(extension);
|
||||||
|
|
||||||
|
if (!currentCS.empty()) dataset->setDestinationCoordinateSystem(currentCS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if no argument read advance to next argument.
|
||||||
|
++pos;
|
||||||
|
}
|
||||||
|
|
||||||
if (source)
|
if (source)
|
||||||
{
|
{
|
||||||
@@ -249,25 +261,6 @@ int main( int argc, char **argv )
|
|||||||
dataset->addSource(source);
|
dataset->addSource(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arguments.read(pos, "-o",filename))
|
|
||||||
{
|
|
||||||
std::cout<<"-o "<<filename<<std::endl;
|
|
||||||
|
|
||||||
argumentRead = true;
|
|
||||||
|
|
||||||
std::string path = osgDB::getFilePath(filename);
|
|
||||||
std::string base = path.empty()?osgDB::getStrippedName(filename):
|
|
||||||
path +'/'+ osgDB::getStrippedName(filename);
|
|
||||||
std::string extension = '.'+osgDB::getLowerCaseFileExtension(filename);
|
|
||||||
|
|
||||||
dataset->setDestinationTileBaseName(base);
|
|
||||||
dataset->setDestinationTileExtension(extension);
|
|
||||||
|
|
||||||
if (!currentCS.empty()) dataset->setDestinationCoordinateSystem(currentCS);
|
|
||||||
}
|
|
||||||
|
|
||||||
// if no argument read advance to next argument.
|
|
||||||
if (!argumentRead) ++pos;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class DataSet : public osg::Referenced
|
|||||||
_numValuesY(0),
|
_numValuesY(0),
|
||||||
_numValuesZ(0) {}
|
_numValuesZ(0) {}
|
||||||
|
|
||||||
SpatialProperties& operator = (const SpatialProperties& sp)
|
inline SpatialProperties& assignSpatialProperties(const SpatialProperties& sp)
|
||||||
{
|
{
|
||||||
if (&sp==this) return *this;
|
if (&sp==this) return *this;
|
||||||
|
|
||||||
@@ -72,6 +72,13 @@ class DataSet : public osg::Referenced
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void computeExtents()
|
||||||
|
{
|
||||||
|
_extents.init();
|
||||||
|
_extents.expandBy( osg::Vec3(0.0,0.0,0.0)*_geoTransform);
|
||||||
|
_extents.expandBy( osg::Vec3(_numValuesX,_numValuesY,0.0)*_geoTransform);
|
||||||
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osgTerrain::CoordinateSystem> _cs;
|
osg::ref_ptr<osgTerrain::CoordinateSystem> _cs;
|
||||||
osg::Matrixd _geoTransform;
|
osg::Matrixd _geoTransform;
|
||||||
osg::BoundingBox _extents;
|
osg::BoundingBox _extents;
|
||||||
@@ -189,15 +196,20 @@ class DataSet : public osg::Referenced
|
|||||||
bool getTemporaryFile() const { return _temporaryFile; }
|
bool getTemporaryFile() const { return _temporaryFile; }
|
||||||
|
|
||||||
void setCoordinateSystemPolicy(ParameterPolicy policy) { _coordinateSystemPolicy = policy; }
|
void setCoordinateSystemPolicy(ParameterPolicy policy) { _coordinateSystemPolicy = policy; }
|
||||||
|
ParameterPolicy getCoordinateSystemPolicy() const { return _coordinateSystemPolicy; }
|
||||||
|
|
||||||
|
void setCoordinateSystem(const std::string& wellKnownText) { _cs = new osgTerrain::CoordinateSystem(wellKnownText); }
|
||||||
void setCoordinateSystem(osgTerrain::CoordinateSystem* cs) { _cs = cs; }
|
void setCoordinateSystem(osgTerrain::CoordinateSystem* cs) { _cs = cs; }
|
||||||
osgTerrain::CoordinateSystem* getCoordinateSystem() { return _cs.get(); }
|
osgTerrain::CoordinateSystem* getCoordinateSystem() { return _cs.get(); }
|
||||||
|
|
||||||
|
|
||||||
void setGeoTransformPolicy(ParameterPolicy policy) { _geoTransformPolicy = policy; }
|
void setGeoTransformPolicy(ParameterPolicy policy) { _geoTransformPolicy = policy; }
|
||||||
|
ParameterPolicy getGeoTransformPolicy() const { return _geoTransformPolicy; }
|
||||||
|
|
||||||
void setGeoTransform(osg::Matrixd& transform) { _geoTransform = transform; }
|
void setGeoTransform(osg::Matrixd& transform) { _geoTransform = transform; }
|
||||||
osg::Matrixd& getGeoTransform() { return _geoTransform; }
|
osg::Matrixd& getGeoTransform() { return _geoTransform; }
|
||||||
|
|
||||||
|
void assignCoordinateSystemAndGeoTransformAccordingToParameterPolicy();
|
||||||
|
|
||||||
void setSourceData(SourceData* data) { _sourceData = data; if (_sourceData.valid()) _sourceData->_source = this; }
|
void setSourceData(SourceData* data) { _sourceData = data; if (_sourceData.valid()) _sourceData->_source = this; }
|
||||||
SourceData* getSourceData() { return _sourceData.get(); }
|
SourceData* getSourceData() { return _sourceData.get(); }
|
||||||
|
|||||||
@@ -182,9 +182,7 @@ DataSet::SourceData* DataSet::SourceData::readData(Source* source)
|
|||||||
0.0, 0.0, 1.0, 0.0,
|
0.0, 0.0, 1.0, 0.0,
|
||||||
geoTransform[0], geoTransform[3], 0.0, 1.0);
|
geoTransform[0], geoTransform[3], 0.0, 1.0);
|
||||||
|
|
||||||
data->_extents.init();
|
data->computeExtents();
|
||||||
data->_extents.expandBy( osg::Vec3(0.0,0.0,0.0)*data->_geoTransform);
|
|
||||||
data->_extents.expandBy( osg::Vec3(data->_numValuesX,data->_numValuesY,0.0)*data->_geoTransform);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (gdalDataSet->GetGCPCount()>0 && gdalDataSet->GetGCPProjection())
|
else if (gdalDataSet->GetGCPCount()>0 && gdalDataSet->GetGCPProjection())
|
||||||
@@ -229,23 +227,19 @@ DataSet::SourceData* DataSet::SourceData::readData(Source* source)
|
|||||||
0.0, 0.0, 1.0, 0.0,
|
0.0, 0.0, 1.0, 0.0,
|
||||||
adfDstGeoTransform[0], adfDstGeoTransform[3], 0.0, 1.0);
|
adfDstGeoTransform[0], adfDstGeoTransform[3], 0.0, 1.0);
|
||||||
|
|
||||||
data->_extents.init();
|
data->computeExtents();
|
||||||
data->_extents.expandBy( osg::Vec3(0.0,0.0,0.0)*data->_geoTransform);
|
|
||||||
data->_extents.expandBy( osg::Vec3(nPixels,nLines,0.0)*data->_geoTransform);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << " No GeoTransform or GCP's - unable to compute position in space"<< std::endl;
|
std::cout << " No GeoTransform or GCP's - unable to compute position in space"<< std::endl;
|
||||||
|
|
||||||
data->_geoTransform.set( 512.0, 0.0, 0.0, 0.0,
|
data->_geoTransform.set( 1.0, 0.0, 0.0, 0.0,
|
||||||
0.0, 512.0, 0.0, 0.0,
|
0.0, 1.0, 0.0, 0.0,
|
||||||
0.0, 0.0, 1.0, 0.0,
|
0.0, 0.0, 1.0, 0.0,
|
||||||
0.0, 0.0, 0.0, 1.0);
|
0.0, 0.0, 0.0, 1.0);
|
||||||
|
|
||||||
data->_extents.init();
|
data->computeExtents();
|
||||||
data->_extents.expandBy( osg::Vec3(0.0,0.0,0.0)*data->_geoTransform);
|
|
||||||
data->_extents.expandBy( osg::Vec3(data->_numValuesX,data->_numValuesY,0.0)*data->_geoTransform);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
@@ -336,9 +330,7 @@ const DataSet::SpatialProperties& DataSet::SourceData::computeSpatialProperties(
|
|||||||
|
|
||||||
GDALDestroyGenImgProjTransformer( hTransformArg );
|
GDALDestroyGenImgProjTransformer( hTransformArg );
|
||||||
|
|
||||||
sp._extents.init();
|
sp.computeExtents();
|
||||||
sp._extents.expandBy( osg::Vec3(0.0,0.0,0.0)*sp._geoTransform);
|
|
||||||
sp._extents.expandBy( osg::Vec3(nPixels,nLines,0.0)*sp._geoTransform);
|
|
||||||
|
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
@@ -641,6 +633,7 @@ void DataSet::SourceData::readHeightField(DestinationData& destination)
|
|||||||
bool ignoreNoDataValue = true;
|
bool ignoreNoDataValue = true;
|
||||||
|
|
||||||
float* heightPtr = heightData;
|
float* heightPtr = heightData;
|
||||||
|
|
||||||
for(int r=destY+destHeight-1;r>=destY;--r)
|
for(int r=destY+destHeight-1;r>=destY;--r)
|
||||||
{
|
{
|
||||||
for(int c=destX;c<destX+destWidth;++c)
|
for(int c=destX;c<destX+destWidth;++c)
|
||||||
@@ -648,6 +641,8 @@ void DataSet::SourceData::readHeightField(DestinationData& destination)
|
|||||||
float h = *heightPtr++;
|
float h = *heightPtr++;
|
||||||
if (h!=noDataValue) hf->setHeight(c,r,offset + h*scale);
|
if (h!=noDataValue) hf->setHeight(c,r,offset + h*scale);
|
||||||
else if (!ignoreNoDataValue) hf->setHeight(c,r,noDataValueFill);
|
else if (!ignoreNoDataValue) hf->setHeight(c,r,noDataValueFill);
|
||||||
|
|
||||||
|
h = hf->getHeight(c,r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,7 +678,41 @@ void DataSet::Source::loadSourceData()
|
|||||||
std::cout<<"DataSet::Source::loadSourceData() "<<_filename<<std::endl;
|
std::cout<<"DataSet::Source::loadSourceData() "<<_filename<<std::endl;
|
||||||
|
|
||||||
_sourceData = SourceData::readData(this);
|
_sourceData = SourceData::readData(this);
|
||||||
if (_sourceData.valid() && !_cs.valid()) _cs = _sourceData->_cs;
|
|
||||||
|
assignCoordinateSystemAndGeoTransformAccordingToParameterPolicy();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DataSet::Source::assignCoordinateSystemAndGeoTransformAccordingToParameterPolicy()
|
||||||
|
{
|
||||||
|
if (getCoordinateSystemPolicy()==PREFER_CONFIG_SETTINGS)
|
||||||
|
{
|
||||||
|
_sourceData->_cs = _cs;
|
||||||
|
|
||||||
|
std::cout<<"assigning CS from Source to Data."<<std::endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_cs = _sourceData->_cs;
|
||||||
|
std::cout<<"assigning CS from Data to Source."<<std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getGeoTransformPolicy()==PREFER_CONFIG_SETTINGS)
|
||||||
|
{
|
||||||
|
_sourceData->_geoTransform = _geoTransform;
|
||||||
|
|
||||||
|
std::cout<<"assigning GeoTransform from Source to Data."<<_geoTransform<<std::endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_geoTransform = _sourceData->_geoTransform;
|
||||||
|
std::cout<<"assigning GeoTransform from Data to Source."<<_geoTransform<<std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
_sourceData->computeExtents();
|
||||||
|
|
||||||
|
_extents = _sourceData->_extents;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DataSet::Source::needReproject(const osgTerrain::CoordinateSystem* cs) const
|
bool DataSet::Source::needReproject(const osgTerrain::CoordinateSystem* cs) const
|
||||||
@@ -1004,26 +1033,18 @@ DataSet::Source* DataSet::Source::doReproject(const std::string& filename, osgTe
|
|||||||
newSource->_filename = filename;
|
newSource->_filename = filename;
|
||||||
newSource->_temporaryFile = true;
|
newSource->_temporaryFile = true;
|
||||||
newSource->_cs = cs;
|
newSource->_cs = cs;
|
||||||
newSource->_geoTransform.set( adfDstGeoTransform[1], adfDstGeoTransform[4], 0.0, 0.0,
|
newSource->_numValuesX = nPixels;
|
||||||
adfDstGeoTransform[2], adfDstGeoTransform[5], 0.0, 0.0,
|
newSource->_numValuesY = nLines;
|
||||||
0.0, 0.0, 1.0, 0.0,
|
newSource->_geoTransform.set( adfDstGeoTransform[1], adfDstGeoTransform[4], 0.0, 0.0,
|
||||||
adfDstGeoTransform[0], adfDstGeoTransform[3], 0.0, 1.0);
|
adfDstGeoTransform[2], adfDstGeoTransform[5], 0.0, 0.0,
|
||||||
|
0.0, 0.0, 1.0, 0.0,
|
||||||
|
adfDstGeoTransform[0], adfDstGeoTransform[3], 0.0, 1.0);
|
||||||
|
|
||||||
newSource->_extents.init();
|
newSource->computeExtents();
|
||||||
newSource->_extents.expandBy( osg::Vec3(0.0,0.0,0.0)*newSource->_geoTransform);
|
|
||||||
newSource->_extents.expandBy( osg::Vec3(nPixels,nLines,0.0)*newSource->_geoTransform);
|
|
||||||
|
|
||||||
// reload the newly created file.
|
// reload the newly created file.
|
||||||
newSource->loadSourceData();
|
newSource->loadSourceData();
|
||||||
|
|
||||||
SourceData* newData = newSource->_sourceData.get();
|
|
||||||
|
|
||||||
// override the values in the new source data.
|
|
||||||
newData->_cs = cs;
|
|
||||||
newData->_extents = newSource->_extents;
|
|
||||||
newData->_geoTransform = newSource->_geoTransform;
|
|
||||||
|
|
||||||
|
|
||||||
return newSource;
|
return newSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2008,7 +2029,6 @@ osg::Node* DataSet::CompositeDestination::createPagedLODScene()
|
|||||||
|
|
||||||
if (_tiles.empty() && _children.size()==1) return _children.front()->createPagedLODScene();
|
if (_tiles.empty() && _children.size()==1) return _children.front()->createPagedLODScene();
|
||||||
|
|
||||||
|
|
||||||
if (_type==GROUP)
|
if (_type==GROUP)
|
||||||
{
|
{
|
||||||
osg::Group* group = new osg::Group;
|
osg::Group* group = new osg::Group;
|
||||||
@@ -2045,12 +2065,20 @@ osg::Node* DataSet::CompositeDestination::createPagedLODScene()
|
|||||||
if (node) tileNodes.push_back(node);
|
if (node) tileNodes.push_back(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float cutOffDistance = -FLT_MAX;
|
||||||
|
for(ChildList::iterator citr=_children.begin();
|
||||||
|
citr!=_children.end();
|
||||||
|
++citr)
|
||||||
|
{
|
||||||
|
cutOffDistance = osg::maximum(cutOffDistance,(*citr)->_maxVisibleDistance);
|
||||||
|
}
|
||||||
|
|
||||||
osg::PagedLOD* pagedLOD = new osg::PagedLOD;
|
osg::PagedLOD* pagedLOD = new osg::PagedLOD;
|
||||||
|
|
||||||
float farDistance = 1e8;
|
float farDistance = 1e8;
|
||||||
if (tileNodes.size()==1)
|
if (tileNodes.size()==1)
|
||||||
{
|
{
|
||||||
pagedLOD->addChild(tileNodes.front(),_maxVisibleDistance,farDistance);
|
pagedLOD->addChild(tileNodes.front(),cutOffDistance,farDistance);
|
||||||
}
|
}
|
||||||
else if (tileNodes.size()>1)
|
else if (tileNodes.size()>1)
|
||||||
{
|
{
|
||||||
@@ -2061,11 +2089,11 @@ osg::Node* DataSet::CompositeDestination::createPagedLODScene()
|
|||||||
{
|
{
|
||||||
group->addChild(*itr);
|
group->addChild(*itr);
|
||||||
}
|
}
|
||||||
pagedLOD->addChild(group,_maxVisibleDistance,farDistance);
|
pagedLOD->addChild(group,cutOffDistance,farDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
pagedLOD->setFileName(1,getSubTileName());
|
pagedLOD->setFileName(1,getSubTileName());
|
||||||
pagedLOD->setRange(1,0,_maxVisibleDistance);
|
pagedLOD->setRange(1,0,cutOffDistance);
|
||||||
|
|
||||||
if (pagedLOD->getNumChildren()>0)
|
if (pagedLOD->getNumChildren()>0)
|
||||||
pagedLOD->setCenter(pagedLOD->getBound().center());
|
pagedLOD->setCenter(pagedLOD->getBound().center());
|
||||||
|
|||||||
Reference in New Issue
Block a user