Added CompositeLayer::addLayer(setname,filename) convinience function

This commit is contained in:
Robert Osfield 2008-08-29 09:28:28 +00:00
parent 141296c323
commit bc747b0935
2 changed files with 6 additions and 0 deletions

View File

@ -416,6 +416,7 @@ class OSGTERRAIN_EXPORT CompositeLayer : public Layer
const Layer* getLayer(unsigned int i) const { return _layers[i].layer.get(); } const Layer* getLayer(unsigned int i) const { return _layers[i].layer.get(); }
void addLayer(const std::string& compoundname); 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)); } void addLayer(Layer* layer) { _layers.push_back(CompoundNameLayer(layer->getName(),layer->getFileName(),layer)); }

View File

@ -627,6 +627,11 @@ void CompositeLayer::addLayer(const std::string& compoundname)
_layers.push_back(CompoundNameLayer(setname,filename,0)); _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 // SwitchLayer