From bc747b09350da1c190c17291a595edacec0021ee Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 29 Aug 2008 09:28:28 +0000 Subject: [PATCH] Added CompositeLayer::addLayer(setname,filename) convinience function --- include/osgTerrain/Layer | 1 + src/osgTerrain/Layer.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/osgTerrain/Layer b/include/osgTerrain/Layer index bd76cac76..57a05fd37 100644 --- a/include/osgTerrain/Layer +++ b/include/osgTerrain/Layer @@ -416,6 +416,7 @@ class OSGTERRAIN_EXPORT CompositeLayer : public Layer const Layer* getLayer(unsigned int i) const { return _layers[i].layer.get(); } void addLayer(const std::string& compoundname); + void addLayer(const std::string& setname, const std::string& filename); void addLayer(Layer* layer) { _layers.push_back(CompoundNameLayer(layer->getName(),layer->getFileName(),layer)); } diff --git a/src/osgTerrain/Layer.cpp b/src/osgTerrain/Layer.cpp index b6e793787..3da10ba95 100644 --- a/src/osgTerrain/Layer.cpp +++ b/src/osgTerrain/Layer.cpp @@ -627,6 +627,11 @@ void CompositeLayer::addLayer(const std::string& compoundname) _layers.push_back(CompoundNameLayer(setname,filename,0)); } +void CompositeLayer::addLayer(const std::string& setname, const std::string& filename) +{ + _layers.push_back(CompoundNameLayer(setname,filename,0)); +} + ///////////////////////////////////////////////////////////////////////////// // // SwitchLayer