diff --git a/examples/osgdem/osgdem.cpp b/examples/osgdem/osgdem.cpp index 05307994c..11c64db36 100644 --- a/examples/osgdem/osgdem.cpp +++ b/examples/osgdem/osgdem.cpp @@ -77,6 +77,18 @@ char *SanitizeSRS( const char *pszUserInput ) return pszResult; } +osg::Matrixd computeGeoTransForRange(double xMin, double xMax, double yMin, double yMax) +{ + osg::Matrixd matrix; + matrix(0,0) = xMax-xMin; + matrix(3,0) = xMin; + + matrix(1,1) = yMax-yMin; + matrix(3,1) = yMin; + + return matrix; +} + void ellipsodeTransformTest(double latitude, double longitude, double height) { @@ -178,7 +190,9 @@ int main( int argc, char **argv ) std::string currentCS; osg::Matrixd geoTransform; bool geoTransformSet = false; - + bool geoTransformScale = false; + double xMin, xMax, yMin, yMax; + int pos = 1; while(possetConvertFromGeographicToGeocentric(true); std::cout<<"--geocentric "<setConvertFromGeographicToGeocentric(true); + std::cout<<"--bluemarble-west"<setConvertFromGeographicToGeocentric(true); + std::cout<<"--bluemarble-west "<setConvertFromGeographicToGeocentric(true); + std::cout<<"--whole-globe "<setGeoTransform "<setGeoTransformPolicy(osgTerrain::DataSet::Source::PREFER_CONFIG_SETTINGS); + source->setGeoTransformPolicy(geoTransformScale ? + osgTerrain::DataSet::Source::PREFER_CONFIG_SETTINGS_BUT_SCALE_BY_FILE_RESOLUTION : + osgTerrain::DataSet::Source::PREFER_CONFIG_SETTINGS); source->setGeoTransform(geoTransform); }