Changed setVolumeTechnique to setVolumeTechniquePrototype()

This commit is contained in:
Robert Osfield 2009-01-14 20:43:21 +00:00
parent 778f4e321d
commit c28221b06f
3 changed files with 14 additions and 13 deletions

View File

@ -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(); }

View File

@ -42,14 +42,15 @@ 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(); }
/** 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 const VolumeTechnique*/
const VolumeTechnique* getVolumeTechnique() const { return _volumeTechnique.get(); }
/** Get the VolumeTechnique prototype. */
VolumeTechnique* getVolumeTechniquePrototype() { return _volumeTechnique.get(); }
/** Get the const VolumeTechnique prototype. */
const VolumeTechnique* getVolumeTechniquePrototype() const { return _volumeTechnique.get(); }
protected:

View File

@ -34,7 +34,7 @@ bool Volume_readLocalData(osg::Object& obj, osgDB::Input &fr)
osg::ref_ptr<osg::Object> readObject = fr.readObjectOfType(osgDB::type_wrapper<osgVolume::VolumeTechnique>());
if (readObject.valid())
{
volume.setVolumeTechnique(dynamic_cast<osgVolume::VolumeTechnique*>(readObject.get()));
volume.setVolumeTechniquePrototype(dynamic_cast<osgVolume::VolumeTechnique*>(readObject.get()));
itrAdvanced = true;
}
@ -47,9 +47,9 @@ bool Volume_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
osg::notify(osg::NOTICE)<<"Volume write"<<std::endl;
if (volume.getVolumeTechnique())
if (volume.getVolumeTechniquePrototype())
{
fw.writeObject(*volume.getVolumeTechnique());
fw.writeObject(*volume.getVolumeTechniquePrototype());
}
return true;