Changeset 8961 for OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
- Timestamp:
- 09/29/08 20:30:17 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
r8954 r8961 761 761 { 762 762 float value = powf(v,5); 763 osg::notify(osg:: NOTICE)<<"sampleDensity = "<<value<<std::endl;763 osg::notify(osg::INFO)<<"sampleDensity = "<<value<<std::endl; 764 764 uniform->set(value); 765 765 } … … 1062 1062 } 1063 1063 1064 osg::Uniform* sampleDensity = new osg::Uniform("sampleDensity", 0.0 1f);1064 osg::Uniform* sampleDensity = new osg::Uniform("sampleDensity", 0.005f); 1065 1065 stateset->addUniform(sampleDensity); 1066 1066 … … 1795 1795 1796 1796 keyswitchManipulator->addMatrixManipulator( '1', "Trackball", new osgGA::TrackballManipulator() ); 1797 keyswitchManipulator->addMatrixManipulator( '2', "Flight", new osgGA::FlightManipulator() ); 1797 1798 osgGA::FlightManipulator* flightManipulator = new osgGA::FlightManipulator(); 1799 flightManipulator->setYawControlMode(osgGA::FlightManipulator::NO_AUTOMATIC_YAW); 1800 keyswitchManipulator->addMatrixManipulator( '2', "Flight", flightManipulator ); 1798 1801 1799 1802 viewer.setCameraManipulator( keyswitchManipulator.get() ); … … 2083 2086 zSize = (*sizeItr)->r(); 2084 2087 ++sizeItr; 2088 2085 2089 for(;sizeItr != images.end(); ++sizeItr) 2086 2090 { … … 2095 2099 2096 2100 2097 #if 02098 osg::RefMatrix* matrix = dynamic_cast<osg::RefMatrix*>(image _3d->getUserData());2101 #if 1 2102 osg::RefMatrix* matrix = dynamic_cast<osg::RefMatrix*>(images.front()->getUserData()); 2099 2103 if (matrix) 2100 2104 { 2101 2105 osg::notify(osg::NOTICE)<<"Image has Matrix = "<<*matrix<<std::endl; 2102 xSize = image_3d->s() * (*matrix)(0,0); 2103 ySize = image_3d->t() * (*matrix)(1,1); 2104 zSize = image_3d->r() * (*matrix)(2,2); 2105 } 2106 #else 2106 xSize = xSize * (*matrix)(0,0); 2107 ySize = ySize * (*matrix)(1,1); 2108 zSize = zSize * (*matrix)(2,2); 2109 } 2107 2110 #endif 2108 2109 2111 2110 2112 osg::Vec4 minValue, maxValue; … … 2114 2116 ++itr) 2115 2117 { 2118 #if 0 2119 osg::RefMatrix* matrix = dynamic_cast<osg::RefMatrix*>((*itr)->getUserData()); 2120 if (matrix) 2121 { 2122 std::cout<<"matrix = "<<*matrix<<std::endl; 2123 } 2124 #endif 2116 2125 if (osgVolume::computeMinMax(itr->get(), minValue, maxValue)) computeMinMax = true; 2117 2126 }
