Further refinement of ProxyLayer API

This commit is contained in:
Robert Osfield 2007-08-30 10:15:35 +00:00
parent 9a9ffbe229
commit 667be8bb57
3 changed files with 5 additions and 5 deletions

View File

@ -320,7 +320,7 @@ class OSGTERRAIN_EXPORT ProxyLayer : public Layer
virtual void close() {} virtual void close() {}
/** Extract an ImageLayer from the ProxyLayer.*/ /** 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: protected:

View File

@ -70,11 +70,11 @@ unsigned int DataSetLayer::getNumRows() const
return _dataset!=0 ? _dataset->GetRasterYSize() : 0; 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<minX || maxY<minY) return 0; if (!_dataset || sourceMaxX<sourceMinX || sourceMaxY<sourceMinY) return 0;
osg::notify(osg::NOTICE)<<"DataSetLayer::extractImageLayer("<<minX<<", "<<minY<<", "<<maxX<<", "<<maxY<<") not yet implemented"<<std::endl; osg::notify(osg::NOTICE)<<"DataSetLayer::extractImageLayer("<<sourceMinX<<", "<<sourceMinY<<", "<<sourceMaxX<<", "<<sourceMaxY<<", target:"<<targetWidth<<", "<<targetHeight<<") not yet implemented"<<std::endl;
return 0; return 0;
} }

View File

@ -43,7 +43,7 @@ class DataSetLayer : public osgTerrain::ProxyLayer
virtual unsigned int getNumRows() const; virtual unsigned int getNumRows() const;
virtual osgTerrain::ImageLayer* extractImageLayer(unsigned int minX, unsigned int minY, unsigned int maxX, unsigned int maxY); virtual osgTerrain::ImageLayer* extractImageLayer(unsigned int sourceMinX, unsigned int sourceMinY, unsigned int sourceMaxX, unsigned int sourceMaxY, unsigned int targetWidth=0, unsigned int targetHeight=0);
protected: protected: