Changeset 339
- Timestamp:
- Mar 23, 2012, 10:56:17 PM (13 years ago)
- Location:
- experimental/distortionNG
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/distortionNG.cpp
r332 r339 112 112 closestVertexIndex = result.indexList[i]; 113 113 } 114 OSG_NOTIFY(osg::ALWAYS)<<"maxRatio="<<maxRatio<<std::endl;115 OSG_NOTIFY(osg::ALWAYS)<<"closestVertexIndex="<<closestVertexIndex<<std::endl;114 // OSG_NOTIFY(osg::ALWAYS)<<"maxRatio="<<maxRatio<<std::endl; 115 // OSG_NOTIFY(osg::ALWAYS)<<"closestVertexIndex="<<closestVertexIndex<<std::endl; 116 116 } 117 117 OSG_NOTIFY(osg::ALWAYS)<<"nearest vertex: X="<<(*vertices)[closestVertexIndex].x()<<" Y="<<(*vertices)[closestVertexIndex].y()<<" Z="<<(*vertices)[closestVertexIndex].z()<<std::endl; -
experimental/distortionNG/extViewer.cpp
r338 r339 44 44 osg::Texture2D* texture = new osg::Texture2D; 45 45 texture->setImage(image); 46 //texture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::NEAREST);47 //texture->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::NEAREST);48 //texture->setWrap(osg::Texture2D::WRAP_S, osg::Texture2D::CLAMP_TO_EDGE);49 //texture->setWrap(osg::Texture2D::WRAP_T, osg::Texture2D::CLAMP_TO_EDGE);50 46 texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); 51 47 texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR); … … 152 148 geom->setTexCoordArray(1,texcoords1); 153 149 154 150 //// Quads grid 151 //for ( unsigned int row=0; row<rows-1; row++ ) // each strip consists of two affected vertex rows, so we need only row-1 strips. 152 //{ 153 // osg::ref_ptr<osg::DrawElementsUInt> de = new osg::DrawElementsUInt(GL_QUAD_STRIP, columns*2); // columns*2 = number of involved vertices for this strip. 154 // for ( unsigned int col=0; col<columns; col++ ) 155 // { 156 // (*de)[col*2 + 0] = row*columns + col; 157 // (*de)[col*2 + 1] = (row+1)*columns + col; 158 // } 159 // geom->addPrimitiveSet( de.get() ); 160 //} 161 162 // Triangle grid 155 163 for ( unsigned int row=0; row<rows-1; row++ ) // each strip consists of two affected vertex rows, so we need only row-1 strips. 156 164 { 157 osg::ref_ptr<osg::DrawElementsUInt> de = new osg::DrawElementsUInt( GL_QUAD_STRIP, columns*2); // columns*2 = number of involved vertices for this strip.165 osg::ref_ptr<osg::DrawElementsUInt> de = new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLE_STRIP, columns * 2 ); 158 166 for ( unsigned int col=0; col<columns; col++ ) 159 167 {
Note: See TracChangeset
for help on using the changeset viewer.