- Timestamp:
- Jun 16, 2012, 1:57:23 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.cpp
r384 r387 387 387 for(int col=0;col<distortionMeshColumns;col++) 388 388 { 389 float x=col/distortionMeshColumns; // Vertex X 390 float y=row/distortionMeshRows; // Vertex Y 391 float z=col/distortionMeshColumns; // TexCoord X 392 float w=row/distortionMeshRows; // TexCoord Y 393 if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION) 389 float x=(float)col/(float)(distortionMeshColumns-1); // Vertex X 390 float y=(float)row/(float)(distortionMeshRows-1); // Vertex Y 391 float z=(float)col/(float)(distortionMeshColumns-1); // TexCoord X 392 float w=(float)row/(float)(distortionMeshRows-1); // TexCoord Y 393 394 /* if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION) 394 395 { 395 396 x = vertexMeshVec2->at(row*col).x(); … … 400 401 z = texCoordMeshVec2->at(row*col).x(); 401 402 w = texCoordMeshVec2->at(row*col).y(); 402 } 403 }*/ 403 404 404 405 distortionMesh->at(row*distortionMeshColumns+col).set(x,y,z,w); 405 406 } 406 407 } 408 409 for (osg::Vec4Array::iterator it = distortionMesh->begin(); it != distortionMesh->end(); ++it) 410 { 411 OSG_ALWAYS<<"final vector: "<<(*it).x()<<" "<<(*it).y()<<" "<<(*it).z()<<" "<<(*it).w()<<std::endl; 412 } 413 407 414 408 415 distortionSet->setDistortionMesh(distortionMesh);
Note: See TracChangeset
for help on using the changeset viewer.