Changeset 388 for experimental


Ignore:
Timestamp:
Jun 16, 2012, 2:14:35 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/distortionNG
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.cpp

    r387 r388  
    211211
    212212                                // Store values into array
    213                                 tmpMesh->push_back(osg::Vec2(values[2], values[3]));
     213                                tmpMesh->push_back(osg::Vec2(values[0], values[1]));
    214214                        }
    215215                }
     
    362362                                if(distortionMeshRows!=texCoordRows || distortionMeshColumns!=texCoordColumns)
    363363                                {
    364                                         OSG_ALWAYS<<"The mesh dimensions of the vertex- and textureCoordinate-distortion differ!"<<std::endl;
     364                                        OSG_ALWAYS<<"The mesh dimensions of the vertex- and textureCoordinate-file differ!"<<std::endl;
    365365                                        return;
    366366                                }
     
    392392                                        float w=(float)row/(float)(distortionMeshRows-1);               // TexCoord Y
    393393
    394         /*                              if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION)
     394                                        if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION)
    395395                                        {
    396                                                 x = vertexMeshVec2->at(row*col).x();
    397                                                 y = vertexMeshVec2->at(row*col).y();
     396                                                x = vertexMeshVec2->at(row*distortionMeshColumns + col).x();
     397                                                y = vertexMeshVec2->at(row*distortionMeshColumns + col).y();
    398398                                        }
    399399                                        if(_distortionType==TEXCOORDDISTORTION || _distortionType==COMBINEDDISTORTION)
    400400                                        {
    401                                                 z = texCoordMeshVec2->at(row*col).x();
    402                                                 w = texCoordMeshVec2->at(row*col).y();
    403                                         }*/
     401                                                z = texCoordMeshVec2->at(row*distortionMeshColumns + col).x();
     402                                                w = texCoordMeshVec2->at(row*distortionMeshColumns + col).y();
     403                                        }
    404404
    405405                                        distortionMesh->at(row*distortionMeshColumns+col).set(x,y,z,w);
     
    407407                        }
    408408
     409#if 0
    409410                        for (osg::Vec4Array::iterator it = distortionMesh->begin(); it != distortionMesh->end(); ++it)
    410411                        {
    411412                                OSG_ALWAYS<<"final vector: "<<(*it).x()<<" "<<(*it).y()<<" "<<(*it).z()<<" "<<(*it).w()<<std::endl;
    412413                        }
     414#endif
    413415
    414416
  • experimental/distortionNG/main.cpp

    r387 r388  
    9595
    9696        DistortionSetupStrategyProjectSyntropy* psStrategy = new DistortionSetupStrategyProjectSyntropy();
    97         psStrategy->setDistortionInputFiles( "./resources/ProjectSyntropy/Vertices/warpmap_2.csv",
    98                                                                                 "./resources/ProjectSyntropy/TexCoords/warpmap_2.csv",
     97        psStrategy->setDistortionInputFiles( "./resources/ProjectSyntropy/Vertices/warpmap_1.csv",
     98                                                                                "./resources/ProjectSyntropy/TexCoords/warpmap_1.csv",
    9999                                                                                "./resources/ProjectSyntropy/blending_1.bmp",
    100100                                                                                "./resources/ProjectSyntropy/Vertices/frustum_1.csv",
     
    132132    if (!rootnode)
    133133    {
    134                 rootnode = osgDB::readNodeFile("cow.osgt");
     134                rootnode = osgDB::readNodeFile("H:\\AllInOnDB\\terrain.osgb");
    135135                if(!rootnode)
    136136                {
Note: See TracChangeset for help on using the changeset viewer.