Changed enum usage to use the new osgVolume::VolumeSettings versions and added support for reading a VolumeSettings file.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14349 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-07-03 13:01:05 +00:00
parent 3c6a1ec117
commit 7a18876c5b
3 changed files with 29 additions and 31 deletions

View File

@@ -30,7 +30,7 @@
#include <osgDB/FileUtils>
#include <osgVolume/VolumeTile>
#include <osgVolume/Property>
#include <osgVolume/VolumeSettings>
#include <osgPresentation/deprecated/AnimationMaterial>
#include <osgPresentation/deprecated/SlideEventHandler>
@@ -284,23 +284,11 @@ public:
struct VolumeData
{
enum ShadingModel
{
Standard,
Light,
Isosurface,
MaximumIntensityProjection
};
enum Technique
{
FixedFunction,
RayTraced,
MultiPass
};
typedef osgVolume::VolumeSettings::ShadingModel ShadingModel;
typedef osgVolume::VolumeSettings::Technique Technique;
VolumeData():
shadingModel(Standard),
shadingModel(osgVolume::VolumeSettings::Standard),
useTabbedDragger(false),
useTrackballDragger(false),
region_in_pixel_coords(false),
@@ -311,12 +299,14 @@ public:
sampleRatioValue("1.0"),
colorSpaceOperation(osg::NO_COLOR_SPACE_OPERATION),
colorModulate(1.0f,1.0f,1.0f,1.0f),
technique(RayTraced)
technique(osgVolume::VolumeSettings::RayTraced)
{
hullPositionData.position = osg::Vec3(0.0,0.0,0.0);
hullPositionData.frame = osgPresentation::SlideShowConstructor::MODEL;
}
osg::ref_ptr<osgVolume::VolumeSettings> volumeSettings;
std::string options;
ShadingModel shadingModel;
osg::ref_ptr<osg::TransferFunction1D> transferFunction;