Ignore:
Timestamp:
Sep 8, 2011, 10:29:38 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/distortionNG
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/extViewer.cpp

    r320 r321  
    55#include<osg/TexMat>
    66#include<osg/ComputeBoundsVisitor>
     7#include<osg/Vec2>
    78
    89#include<osgDB/ReadFile>
     
    118119        osg::Geode* geode = new osg::Geode();
    119120                //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), 3, 3));
     121                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), 4, 4));
    121122
    122123        // new we need to add the texture to the mesh, we do so by creating a
     
    192193                {
    193194                        vertices->push_back( origin+dy*row+dx*col );
    194                         texcoords0->push_back( osg::Vec2((float)col/(float)(columns-1), (float)row/(float)(rows-1)) );
     195                        osg::Vec2 texcoord = osg::Vec2((float)col/(float)(columns-1), (float)row/(float)(rows-1));
     196                        texcoords0->push_back( texcoord );
    195197
    196198//      if (intensityMap)
     
    234236        }
    235237
    236 
    237 
    238         /*osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
    239         texture->setImage( osgDB::readImageFile("Images/osg256.png") );
    240         texture->setFilter( osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR_MIPMAP_LINEAR );
    241         texture->setFilter( osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR_MIPMAP_LINEAR );
    242         geom->getOrCreateStateSet()->setTextureAttributeAndModes( 0, texture.get() );*/
    243 
    244 
    245238        return geom.release();
    246239}
  • experimental/distortionNG/main.cpp

    r315 r321  
    4242    extViewer viewer(arguments);
    4343        viewer.setUpViewForManualDistortion();
    44 
    4544
    4645    // set up the camera manipulators.
Note: See TracChangeset for help on using the changeset viewer.