Added setSetName/getSetName() methods

This commit is contained in:
Robert Osfield 2008-09-02 12:55:26 +00:00
parent 0a5a91f5a1
commit 08883dbf6c

View File

@ -44,6 +44,9 @@ class OSGTERRAIN_EXPORT Layer : public osg::Object
META_Object(osgTerrain, Layer);
void setSetName(const std::string& setname) { setName(setname); }
const std::string& getSetName() const { return getName(); }
/** Set the file name of the data associated with this layer. */
virtual void setFileName(const std::string& filename) { _filename = filename; }
@ -401,6 +404,9 @@ class OSGTERRAIN_EXPORT CompositeLayer : public Layer
void clear();
void setSetName(const std::string& setname) { setName(setname); }
const std::string& getSetName() const { return getName(); }
void setSetName(unsigned int i, const std::string& setname) { _layers[i].setname = setname; if (_layers[i].layer.valid()) _layers[i].layer->setName(setname); }
const std::string& getSetName(unsigned int i) const { return _layers[i].layer.valid() ? _layers[i].layer->getName() : _layers[i].setname; }