Added AlphaFunc support into osgVolume::AlphaFuncProperty.

This commit is contained in:
Robert Osfield
2009-01-20 12:39:26 +00:00
parent 8a971d96d2
commit 87cd4530f5
11 changed files with 51 additions and 19 deletions

View File

@@ -782,6 +782,7 @@ class FollowMouseCallback : public osgGA::GUIEventHandler, public osg::StateSet:
if (_updateAlphaCutOff && cpv._afProperty.valid())
{
osg::notify(osg::NOTICE)<<"Setting afProperty to "<<v<<std::endl;
cpv._afProperty->setValue(v);
}
}
@@ -1345,24 +1346,27 @@ int main( int argc, char **argv )
switch(shadingModel)
{
case(Standard):
layer->addProperty(new osgVolume::AlphaFuncProperty(alphaFunc));
break;
case(Light):
layer->addProperty(new osgVolume::AlphaFuncProperty(alphaFunc));
layer->addProperty(new osgVolume::LightingProperty);
break;
case(Isosurface):
layer->addProperty(new osgVolume::IsoSurfaceProperty(alphaFunc));
break;
case(MaximumIntensityProjection):
layer->addProperty(new osgVolume::AlphaFuncProperty(alphaFunc));
layer->addProperty(new osgVolume::MaximumIntensityProjectionProperty);
break;
}
layer->addProperty(new osgVolume::AlphaFuncProperty(alphaFunc));
tile->setVolumeTechnique(new osgVolume::ShaderTechnique);
}
else
{
layer->addProperty(new osgVolume::AlphaFuncProperty(alphaFunc));
tile->setVolumeTechnique(new osgVolume::FixedFunctionTechnique);
}