Changeset 9513 for OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
- Timestamp:
- 01/20/09 14:50:57 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
r9511 r9513 774 774 { 775 775 float v = (ea.getY()-ea.getYmin())/(ea.getYmax()-ea.getYmin()); 776 float v2 = v*v; 776 777 777 778 if (_updateAlphaCutOff && cpv._isoProperty.valid()) … … 785 786 osg::notify(osg::NOTICE)<<"Setting afProperty to "<<v<<std::endl; 786 787 cpv._afProperty->setValue(v); 788 } 789 790 if (_updateTransparency && cpv._transparencyProperty.valid()) 791 { 792 osg::notify(osg::NOTICE)<<"Setting transparency to "<<v2<<std::endl; 793 cpv._transparencyProperty->setValue(v2); 794 } 795 796 if (_updateSampleDensity && cpv._sampleDensityProperty.valid()) 797 { 798 osg::notify(osg::NOTICE)<<"Setting sample density to "<<v2<<std::endl; 799 cpv._sampleDensityProperty->setValue(v2); 787 800 } 788 801 } … … 1362 1375 } 1363 1376 1377 layer->addProperty(new osgVolume::SampleDensityProperty(0.005)); 1378 layer->addProperty(new osgVolume::TransparencyProperty(1.0)); 1379 1364 1380 1365 1381 tile->setVolumeTechnique(new osgVolume::ShaderTechnique);
