From 667be8bb57de1bf4eb57dc1a149f11cedf61fe04 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 30 Aug 2007 10:15:35 +0000 Subject: [PATCH] Further refinement of ProxyLayer API --- include/osgTerrain/Layer | 2 +- src/osgPlugins/gdal/DataSetLayer.cpp | 6 +++--- src/osgPlugins/gdal/DataSetLayer.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/osgTerrain/Layer b/include/osgTerrain/Layer index e2c1613e5..534577333 100644 --- a/include/osgTerrain/Layer +++ b/include/osgTerrain/Layer @@ -320,7 +320,7 @@ class OSGTERRAIN_EXPORT ProxyLayer : public Layer virtual void close() {} /** Extract an ImageLayer from the ProxyLayer.*/ - virtual ImageLayer* extractImageLayer(unsigned int /*minX*/, unsigned int /*minY*/, unsigned int /*maxX*/, unsigned int /*maxY*/) { return 0; } + virtual ImageLayer* extractImageLayer(unsigned int /*sourceMinX*/, unsigned int /*sourceMinY*/, unsigned int /*sourceMaxX*/, unsigned int /*sourceMaxY*/, unsigned int /*targetWidth*/=0, unsigned int /*targetHeight*/=0) { return 0; } protected: diff --git a/src/osgPlugins/gdal/DataSetLayer.cpp b/src/osgPlugins/gdal/DataSetLayer.cpp index 2fa240d92..386f14548 100644 --- a/src/osgPlugins/gdal/DataSetLayer.cpp +++ b/src/osgPlugins/gdal/DataSetLayer.cpp @@ -70,11 +70,11 @@ unsigned int DataSetLayer::getNumRows() const return _dataset!=0 ? _dataset->GetRasterYSize() : 0; } -osgTerrain::ImageLayer* DataSetLayer::extractImageLayer(unsigned int minX, unsigned int minY, unsigned int maxX, unsigned int maxY) +osgTerrain::ImageLayer* DataSetLayer::extractImageLayer(unsigned int sourceMinX, unsigned int sourceMinY, unsigned int sourceMaxX, unsigned int sourceMaxY, unsigned int targetWidth, unsigned int targetHeight) { - if (!_dataset || maxX