Fixed handling of TransferFunctionProperty.

This commit is contained in:
Robert Osfield 2009-01-31 21:45:47 +00:00
parent 6fda032aa2
commit 281800539e

View File

@ -1269,7 +1269,7 @@ int main( int argc, char **argv )
osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(alphaFunc); osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(alphaFunc);
osgVolume::SampleDensityProperty* sd = new osgVolume::SampleDensityProperty(0.005); osgVolume::SampleDensityProperty* sd = new osgVolume::SampleDensityProperty(0.005);
osgVolume::TransparencyProperty* tp = new osgVolume::TransparencyProperty(1.0); osgVolume::TransparencyProperty* tp = new osgVolume::TransparencyProperty(1.0);
osgVolume::TransferFunctionProperty* tfp = new osgVolume::TransferFunctionProperty(transferFunction.get()); osgVolume::TransferFunctionProperty* tfp = transferFunction.valid() ? new osgVolume::TransferFunctionProperty(transferFunction.get()) : 0;
{ {
// Standard // Standard