Added VolumeSettings::Filename property.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14383 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2014-07-23 16:36:17 +00:00
parent aa2c9c152f
commit 3a7942dfb7
4 changed files with 10 additions and 2 deletions

View File

@ -33,6 +33,9 @@ class OSGVOLUME_EXPORT VolumeSettings : public Property
virtual void accept(PropertyVisitor& pv); virtual void accept(PropertyVisitor& pv);
virtual void traverse(PropertyVisitor& pv); virtual void traverse(PropertyVisitor& pv);
void setFilename(const std::string& str) { _filename = str; }
const std::string& getFilename() const { return _filename; }
enum Technique enum Technique
{ {
FixedFunction, FixedFunction,
@ -74,6 +77,8 @@ class OSGVOLUME_EXPORT VolumeSettings : public Property
virtual ~VolumeSettings() {} virtual ~VolumeSettings() {}
std::string _filename;
Technique _technique; Technique _technique;
ShadingModel _shadingModel; ShadingModel _shadingModel;

View File

@ -1435,8 +1435,8 @@ void ReaderWriterP3DXML::parseVolume(osgPresentation::SlideShowConstructor& cons
if (volumeData.volumeSettings.valid()) if (volumeData.volumeSettings.valid())
{ {
OSG_NOTICE<<"VolumeSetting read "<<vs<<" "<<volumeData.volumeSettings.get()<<std::endl; OSG_NOTICE<<"VolumeSetting read "<<vs<<" "<<volumeData.volumeSettings.get()<<std::endl;
volumeData.volumeSettings->setName(vs); volumeData.volumeSettings->setFilename(vs);
OSG_NOTICE<<" assigned name to VS "<<volumeData.volumeSettings->getName()<<std::endl; OSG_NOTICE<<" assigned name to VS "<<volumeData.volumeSettings->getFilename()<<std::endl;
} }
} }

View File

@ -27,6 +27,7 @@ VolumeSettings::VolumeSettings():
VolumeSettings::VolumeSettings(const VolumeSettings& vs,const osg::CopyOp& copyop): VolumeSettings::VolumeSettings(const VolumeSettings& vs,const osg::CopyOp& copyop):
Property(vs, copyop), Property(vs, copyop),
_filename(vs._filename),
_technique(vs._technique), _technique(vs._technique),
_shadingModel(vs._shadingModel), _shadingModel(vs._shadingModel),
_sampleRatioProperty(osg::clone(vs._sampleRatioProperty.get(), copyop)), _sampleRatioProperty(osg::clone(vs._sampleRatioProperty.get(), copyop)),

View File

@ -9,6 +9,8 @@ REGISTER_OBJECT_WRAPPER( osgVolume_VolumeSettings,
osgVolume::VolumeSettings, osgVolume::VolumeSettings,
"osg::Object osgVolume::VolumeSettings" ) "osg::Object osgVolume::VolumeSettings" )
{ {
ADD_STRING_SERIALIZER( Filename, "" );
BEGIN_ENUM_SERIALIZER( Technique, MultiPass ); BEGIN_ENUM_SERIALIZER( Technique, MultiPass );
ADD_ENUM_VALUE( FixedFunction ); ADD_ENUM_VALUE( FixedFunction );
ADD_ENUM_VALUE( RayTraced ); ADD_ENUM_VALUE( RayTraced );