From c28221b06f77ebe6b52df2dff5ad74e17dcd8672 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 14 Jan 2009 20:43:21 +0000 Subject: [PATCH] Changed setVolumeTechnique to setVolumeTechniquePrototype() --- include/osgTerrain/Terrain | 4 ++-- include/osgVolume/Volume | 17 +++++++++-------- src/osgPlugins/osgVolume/Volume.cpp | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/osgTerrain/Terrain b/include/osgTerrain/Terrain index c80ef46c3..9f7fa1c3a 100644 --- a/include/osgTerrain/Terrain +++ b/include/osgTerrain/Terrain @@ -64,8 +64,8 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group /** Get the const TerrainTile for a given TileID.*/ const TerrainTile* getTile(const TileID& tileID) const; - /** Set the TerrainTechnique cprototype from which TerrainTiles can clone the techniques from..*/ - void setTerrainTechniquePrototype(TerrainTechnique* technique); + /** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from..*/ + void setTerrainTechniquePrototype(TerrainTechnique* technique) { _terrainTechnique = technique; } /** Get the TerrainTechnique prototype */ TerrainTechnique* getTerrainTechniquePrototype() { return _terrainTechnique.get(); } diff --git a/include/osgVolume/Volume b/include/osgVolume/Volume index 4e746fe06..f578e2399 100644 --- a/include/osgVolume/Volume +++ b/include/osgVolume/Volume @@ -41,15 +41,16 @@ class OSGVOLUME_EXPORT Volume : public osg::Group /** Get the const VolumeTile for a given VolumeTileID.*/ const VolumeTile* getVolumeTile(const TileID& tileID) const; - - /** Set the VolumeTechnique*/ - void setVolumeTechnique(VolumeTechnique* VolumeTechnique); - - /** Get the VolumeTechnique*/ - VolumeTechnique* getVolumeTechnique() { return _volumeTechnique.get(); } - /** Get the const VolumeTechnique*/ - const VolumeTechnique* getVolumeTechnique() const { return _volumeTechnique.get(); } + + /** Set the VolumeTechnique prototype that nested VolumeTile should clone if they haven't already been assigned a volume rendering technique. */ + void setVolumeTechniquePrototype(VolumeTechnique* volumeTechnique) { _volumeTechnique = volumeTechnique; } + + /** Get the VolumeTechnique prototype. */ + VolumeTechnique* getVolumeTechniquePrototype() { return _volumeTechnique.get(); } + + /** Get the const VolumeTechnique prototype. */ + const VolumeTechnique* getVolumeTechniquePrototype() const { return _volumeTechnique.get(); } protected: diff --git a/src/osgPlugins/osgVolume/Volume.cpp b/src/osgPlugins/osgVolume/Volume.cpp index 148a4de02..f54651d58 100644 --- a/src/osgPlugins/osgVolume/Volume.cpp +++ b/src/osgPlugins/osgVolume/Volume.cpp @@ -34,7 +34,7 @@ bool Volume_readLocalData(osg::Object& obj, osgDB::Input &fr) osg::ref_ptr readObject = fr.readObjectOfType(osgDB::type_wrapper()); if (readObject.valid()) { - volume.setVolumeTechnique(dynamic_cast(readObject.get())); + volume.setVolumeTechniquePrototype(dynamic_cast(readObject.get())); itrAdvanced = true; } @@ -47,9 +47,9 @@ bool Volume_writeLocalData(const osg::Object& obj, osgDB::Output& fw) osg::notify(osg::NOTICE)<<"Volume write"<