Added initial support for 1D transfer functions to MultipassTechnique

This commit is contained in:
Robert Osfield
2013-12-11 12:00:27 +00:00
parent ff4a0ce1e2
commit e3bf55a266
2 changed files with 56 additions and 2 deletions

View File

@@ -1067,6 +1067,7 @@ int main( int argc, char **argv )
sp->setActiveProperty(0);
osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(alphaFunc);
osgVolume::IsoSurfaceProperty* isop = new osgVolume::IsoSurfaceProperty(alphaFunc);
// SampleDensity is now deprecated
osgVolume::SampleDensityProperty* sd = new osgVolume::SampleDensityProperty(0.005f);
@@ -1087,7 +1088,13 @@ int main( int argc, char **argv )
cp->addProperty(tp);
if (sdwm) cp->addProperty(sdwm);
if (tfp) cp->addProperty(tfp);
if (tfp)
{
OSG_NOTICE<<"Adding TransferFunction"<<std::endl;
cp->addProperty(tfp);
}
cp->addProperty(isop);
sp->addProperty(cp);
}
@@ -1112,7 +1119,7 @@ int main( int argc, char **argv )
if (useMultipass) cp->addProperty(sr);
else cp->addProperty(sd);
cp->addProperty(tp);
cp->addProperty(new osgVolume::IsoSurfaceProperty(alphaFunc));
cp->addProperty(isop);
if (sdwm) cp->addProperty(sdwm);
if (tfp) cp->addProperty(tfp);