Changeset 388
- Timestamp:
- Jun 16, 2012, 2:14:35 PM (12 years ago)
- Location:
- experimental/distortionNG
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.cpp
r387 r388 211 211 212 212 // Store values into array 213 tmpMesh->push_back(osg::Vec2(values[ 2], values[3]));213 tmpMesh->push_back(osg::Vec2(values[0], values[1])); 214 214 } 215 215 } … … 362 362 if(distortionMeshRows!=texCoordRows || distortionMeshColumns!=texCoordColumns) 363 363 { 364 OSG_ALWAYS<<"The mesh dimensions of the vertex- and textureCoordinate- distortiondiffer!"<<std::endl;364 OSG_ALWAYS<<"The mesh dimensions of the vertex- and textureCoordinate-file differ!"<<std::endl; 365 365 return; 366 366 } … … 392 392 float w=(float)row/(float)(distortionMeshRows-1); // TexCoord Y 393 393 394 /*if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION)394 if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION) 395 395 { 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(); 398 398 } 399 399 if(_distortionType==TEXCOORDDISTORTION || _distortionType==COMBINEDDISTORTION) 400 400 { 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 } 404 404 405 405 distortionMesh->at(row*distortionMeshColumns+col).set(x,y,z,w); … … 407 407 } 408 408 409 #if 0 409 410 for (osg::Vec4Array::iterator it = distortionMesh->begin(); it != distortionMesh->end(); ++it) 410 411 { 411 412 OSG_ALWAYS<<"final vector: "<<(*it).x()<<" "<<(*it).y()<<" "<<(*it).z()<<" "<<(*it).w()<<std::endl; 412 413 } 414 #endif 413 415 414 416 -
experimental/distortionNG/main.cpp
r387 r388 95 95 96 96 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", 99 99 "./resources/ProjectSyntropy/blending_1.bmp", 100 100 "./resources/ProjectSyntropy/Vertices/frustum_1.csv", … … 132 132 if (!rootnode) 133 133 { 134 rootnode = osgDB::readNodeFile(" cow.osgt");134 rootnode = osgDB::readNodeFile("H:\\AllInOnDB\\terrain.osgb"); 135 135 if(!rootnode) 136 136 {
Note: See TracChangeset
for help on using the changeset viewer.