Added support for min to max level ranges for Layers in support of VirtualPlanetBuilder usage of this.

This commit is contained in:
Robert Osfield
2007-12-20 15:51:13 +00:00
parent 2c0842c7b7
commit 2cab28c3b8
3 changed files with 41 additions and 2 deletions

View File

@@ -23,6 +23,8 @@
namespace osgTerrain {
#define MAXIMUM_NUMBER_OF_LEVELS 30
class OSGTERRAIN_EXPORT Layer : public osg::Object
{
public:
@@ -40,6 +42,12 @@ class OSGTERRAIN_EXPORT Layer : public osg::Object
void setLocator(Locator* locator) { _locator = locator; }
Locator* getLocator() { return _locator.get(); }
const Locator* getLocator() const { return _locator.get(); }
void setMinLevel(unsigned int minLevel) { _minLevel = minLevel; }
unsigned int getMinLevel() const { return _minLevel; }
void setMaxLevel(unsigned int maxLevel) { _maxLevel = maxLevel; }
unsigned int getMaxLevel() const { return _maxLevel; }
void setValidDataOperator(ValidDataOperator* validDataOp) { _validDataOperator = validDataOp; }
ValidDataOperator* getValidDataOperator() { return _validDataOperator.get(); }
@@ -160,6 +168,8 @@ class OSGTERRAIN_EXPORT Layer : public osg::Object
std::string _filename;
osg::ref_ptr<Locator> _locator;
unsigned int _minLevel;
unsigned int _maxLevel;
osg::ref_ptr<ValidDataOperator> _validDataOperator;
osg::Vec4 _defaultValue;