Changeset 12486 for OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
- Timestamp:
- 06/03/11 17:58:36 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
r12255 r12486 843 843 844 844 845 osg::TransferFunction1D* readTransferFunctionFile(const std::string& filename )845 osg::TransferFunction1D* readTransferFunctionFile(const std::string& filename, float colorScale=1.0f) 846 846 { 847 847 std::string foundFile = osgDB::findDataFile(filename); … … 863 863 { 864 864 std::cout<<"value = "<<value<<" ("<<red<<", "<<green<<", "<<blue<<", "<<alpha<<")"<<std::endl; 865 colorMap[value] = osg::Vec4(red ,green,blue,alpha);865 colorMap[value] = osg::Vec4(red*colorScale,green*colorScale,blue*colorScale,alpha*colorScale); 866 866 } 867 867 } … … 1052 1052 transferFunction = readTransferFunctionFile(tranferFunctionFile); 1053 1053 } 1054 while (arguments.read("--tf-255",tranferFunctionFile)) 1055 { 1056 transferFunction = readTransferFunctionFile(tranferFunctionFile,1.0f/255.0f); 1057 } 1054 1058 1055 1059 while(arguments.read("--test"))
