- Timestamp:
- 04/14/06 16:24:12 (7 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgprecipitation/osgprecipitation.cpp
r5090 r5091 43 43 fogExponent(1.0), 44 44 fogEnd(1000.0), 45 fogColour(0.5, 0.5, 0.5, 1.0) 45 fogColour(0.5, 0.5, 0.5, 1.0), 46 clearColour(0.5, 0.5, 0.5, 1.0) 46 47 {} 47 48 … … 50 51 particleVelocity = osg::Vec3(0.0,0.0,-2.0) + osg::Vec3(0.0,0.0,-10.0)*intensity; 51 52 particleSize = 0.01 + 0.02*intensity; 52 numberOfParticles = intensity * 100000000;53 53 particleColour = osg::Vec4(0.6, 0.6, 0.6, 1.0) - osg::Vec4(0.1, 0.1, 0.1, 1.0)* intensity; 54 numberOfParticles = intensity * 85000000; 55 numberOfCellsX = 50 + (int)(150.0f*intensity); 56 numberOfCellsY = 50 + (int)(150.0f*intensity); 57 farTransition = 140.0f - 100.0f*intensity; 54 58 fogExponent = 1.0f; 55 59 fogDensity = 0.01f*intensity; 56 60 fogEnd = 250/(0.01 + intensity); 57 farTransition = 150.0f - 100.0f*intensity; 61 fogColour.set(0.5, 0.5, 0.5, 1.0); 62 clearColour.set(0.5, 0.5, 0.5, 1.0); 58 63 } 59 64 … … 62 67 particleVelocity = osg::Vec3(0.0,0.0,-1.0) + osg::Vec3(0.0,0.0,-0.5)*intensity; 63 68 particleSize = 0.02 + 0.03*intensity; 64 numberOfParticles = intensity * 100000000;65 69 particleColour = osg::Vec4(0.85f, 0.85f, 0.85f, 1.0f) - osg::Vec4(0.1f, 0.1f, 0.1f, 1.0f)* intensity; 70 numberOfParticles = intensity * 80000000; 71 numberOfCellsX = 50 + (int)(150.0f*intensity); 72 numberOfCellsY = 50 + (int)(150.0f*intensity); 73 farTransition = 140.0f - 100.0f*intensity; 66 74 fogExponent = 1.0f; 67 75 fogDensity = 0.02f*intensity; 68 76 fogEnd = 150.0f/(0.01f + intensity); 69 farTransition = 150.0f - 100.0f*intensity; 77 fogColour.set(0.6, 0.6, 0.6, 1.0); 78 clearColour.set(0.6, 0.6, 0.6, 1.0); 70 79 } 71 80 … … 84 93 float fogEnd; 85 94 osg::Vec4 fogColour; 95 osg::Vec4 clearColour; 86 96 }; 87 97 … … 753 763 while (arguments.read("--fogColour", parameters.fogColour.r(), parameters.fogColour.g(), parameters.fogColour.b(), parameters.fogColour.a())) {} 754 764 765 766 viewer.setClearColor(parameters.clearColour); 767 755 768 // if user request help write it out to cout. 756 769 if (arguments.read("-h") || arguments.read("--help"))
