Changeset 320 for experimental/distortionNG
- Timestamp:
- Sep 8, 2011, 9:11:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/extViewer.cpp
r319 r320 118 118 osg::Geode* geode = new osg::Geode(); 119 119 //geode->addDrawable(createParoramicSphericalDisplayDistortionMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), 1, 0.45, 0, projectorMatrix)); 120 geode->addDrawable(createMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), 16, 9));120 geode->addDrawable(createMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), 3, 3)); 121 121 122 122 // new we need to add the texture to the mesh, we do so by creating a … … 154 154 camera->addChild(geode); 155 155 156 camera->setName("Dist ortionCorrectionCamera");156 camera->setName("Dist Cam"); 157 157 158 158 addSlave(camera.get(), osg::Matrixd(), osg::Matrixd(), false); … … 192 192 { 193 193 vertices->push_back( origin+dy*row+dx*col ); 194 texcoords0->push_back( osg::Vec2((float)col/(float) columns, (float)row/(float)rows) );194 texcoords0->push_back( osg::Vec2((float)col/(float)(columns-1), (float)row/(float)(rows-1)) ); 195 195 196 196 // if (intensityMap) … … 236 236 237 237 238 //osg::ComputeBoundsVisitor cbv;239 //cbv.applyDrawable(geom);240 //osg::BoundingBox box = cbv.getBoundingBox();241 //if (!box.valid())242 // std::cout << "Invalid bounding box!";243 //geom->setInitialBound(box);244 245 238 /*osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D; 246 239 texture->setImage( osgDB::readImageFile("Images/osg256.png") ); … … 249 242 geom->getOrCreateStateSet()->setTextureAttributeAndModes( 0, texture.get() );*/ 250 243 251 // Create normals252 //osgUtil::SmoothingVisitor::smooth( *geom );253 244 254 245 return geom.release();
Note: See TracChangeset
for help on using the changeset viewer.