Changeset 8930 for OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
- Timestamp:
- 09/24/08 12:20:23 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
r8919 r8930 1721 1721 osg::TransferFunction1D::ValueMap valueMap; 1722 1722 float value = 0.0; 1723 while(fin && value< 1.0)1723 while(fin && value<=1.0) 1724 1724 { 1725 1725 float red, green, blue, alpha; … … 1727 1727 if (fin) 1728 1728 { 1729 std::cout<<"value = "<<value<<" ("<<red<<", "<<green<<", "<<blue<<", "<<alpha<<")"<<std::endl; 1730 valueMap[value] = osg::Vec4(red/255.0+0.5,green/255.0+0.5,blue/255.0+0.5,alpha/255.0+0.5); 1729 valueMap[value] = osg::Vec4(red/255.0f,green/255.0f,blue/255.0f,alpha/255.0f); 1730 std::cout<<"value = "<<value<<" ("<<red<<", "<<green<<", "<<blue<<", "<<alpha<<")"; 1731 std::cout<<" ("<<valueMap[value]<<")"<<std::endl; 1731 1732 } 1732 1733 value += 1/255.0;
