Further refinement of ProxyLayer API
This commit is contained in:
parent
9a9ffbe229
commit
667be8bb57
@ -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:
|
||||
|
||||
|
@ -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<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;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class DataSetLayer : public osgTerrain::ProxyLayer
|
||||
|
||||
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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user