Changeset 320 for experimental


Ignore:
Timestamp:
Sep 8, 2011, 9:11:50 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/extViewer.cpp

    r319 r320  
    118118        osg::Geode* geode = new osg::Geode();
    119119                //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));
    121121
    122122        // new we need to add the texture to the mesh, we do so by creating a
     
    154154        camera->addChild(geode);
    155155
    156         camera->setName("DistortionCorrectionCamera");
     156        camera->setName("Dist Cam");
    157157
    158158        addSlave(camera.get(), osg::Matrixd(), osg::Matrixd(), false);
     
    192192                {
    193193                        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)) );
    195195
    196196//      if (intensityMap)
     
    236236
    237237
    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 
    245238        /*osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
    246239        texture->setImage( osgDB::readImageFile("Images/osg256.png") );
     
    249242        geom->getOrCreateStateSet()->setTextureAttributeAndModes( 0, texture.get() );*/
    250243
    251         // Create normals
    252         //osgUtil::SmoothingVisitor::smooth( *geom );
    253244
    254245        return geom.release();
Note: See TracChangeset for help on using the changeset viewer.