diff --git a/TextureControl.cc b/TextureControl.cc index fe75608076d71827566cb691ffb91e0ee0eb8194..47d1ae4d9627026a199066429c409b9fbb012141 100644 --- a/TextureControl.cc +++ b/TextureControl.cc @@ -1995,8 +1995,8 @@ void TextureControlPlugin::getCoordinates1D(QString _textureName, int _id, std:: return; } - for ( TriMesh::VertexIter v_it = mesh->vertices_begin() ; v_it != mesh->vertices_end(); ++v_it) - _x.push_back( mesh->property(coordProp,*v_it) ); + for (auto v_it : mesh->vertices()) + _x.push_back( mesh->property(coordProp,v_it) ); } // end of if vertex based for tri meshes else if ( texData->texture(_textureName).type() == HALFEDGEBASED ) @@ -2009,8 +2009,8 @@ void TextureControlPlugin::getCoordinates1D(QString _textureName, int _id, std:: return; } - for ( TriMesh::HalfedgeIter h_it = mesh->halfedges_begin() ; h_it != mesh->halfedges_end(); ++h_it) - _x.push_back( mesh->property(coordProp,*h_it) ); + for ( auto h_it : mesh->halfedges()) + _x.push_back( mesh->property(coordProp,h_it) ); } // end of if halfedge based for tri meshes } // end of if tri mesh @@ -2028,8 +2028,8 @@ void TextureControlPlugin::getCoordinates1D(QString _textureName, int _id, std:: return; } - for ( PolyMesh::VertexIter v_it = mesh->vertices_begin() ; v_it != mesh->vertices_end(); ++v_it) - _x.push_back( mesh->property(coordProp,*v_it) ); + for (auto v_it : mesh->vertices()) + _x.push_back( mesh->property(coordProp,v_it) ); } // end of if vertex based for poly meshes else if ( texData->texture(_textureName).type() == HALFEDGEBASED ) { @@ -2041,8 +2041,8 @@ void TextureControlPlugin::getCoordinates1D(QString _textureName, int _id, std:: return; } - for ( PolyMesh::HalfedgeIter h_it = mesh->halfedges_begin() ; h_it != mesh->halfedges_end(); ++h_it) - _x.push_back( mesh->property(coordProp,*h_it) ); + for (auto h_it : mesh->halfedges()) + _x.push_back( mesh->property(coordProp,h_it) ); } // end of if halfedge based for poly meshes }// end of if poly mesh #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT @@ -2060,8 +2060,8 @@ void TextureControlPlugin::getCoordinates1D(QString _textureName, int _id, std:: OpenVolumeMesh::VertexPropertyT<double> coordProp = mesh->request_vertex_property<double>(_textureName.toStdString()); - for ( OpenVolumeMesh::VertexIter v_it = mesh->vertices_begin() ; v_it != mesh->vertices_end(); ++v_it) - _x.push_back( coordProp[*v_it] ); + for (auto v_it : mesh->vertices()) + _x.push_back( coordProp[v_it] ); } else { @@ -2085,8 +2085,8 @@ void TextureControlPlugin::getCoordinates1D(QString _textureName, int _id, std:: OpenVolumeMesh::VertexPropertyT<double> coordProp = mesh->request_vertex_property<double>(_textureName.toStdString()); - for ( OpenVolumeMesh::VertexIter v_it = mesh->vertices_begin() ; v_it != mesh->vertices_end(); ++v_it) - _x.push_back( coordProp[*v_it] ); + for (auto v_it : mesh->vertices()) + _x.push_back( coordProp[v_it] ); } else { diff --git a/TextureControl1DTextureHandlingOVMT_impl.hh b/TextureControl1DTextureHandlingOVMT_impl.hh index b3d93afe2eb659991b2fbc60de9272ea3c3d5174..0e56a360fb4f2eab723dc14b88c4a333a39b7704 100644 --- a/TextureControl1DTextureHandlingOVMT_impl.hh +++ b/TextureControl1DTextureHandlingOVMT_impl.hh @@ -57,10 +57,10 @@ void TextureControlPlugin::copyTexture( Texture& _texture , VolumeMeshT& _mesh, // Compute minimal and maximal value of the coordinates // Keep track of absolute values! - for ( OpenVolumeMesh::VertexIter v_it = _mesh.vertices_begin() ; v_it != _mesh.vertices_end(); ++v_it) { + for (auto v_it : _mesh.vertices()) { - max = std::max( _texProp[*v_it] , max); - min = std::min( _texProp[*v_it] , min); + max = std::max( _texProp[v_it] , max); + min = std::min( _texProp[v_it] , min); } @@ -68,15 +68,15 @@ void TextureControlPlugin::copyTexture( Texture& _texture , VolumeMeshT& _mesh, TextureMath convert(_texture.parameters,min,max); - for ( OpenVolumeMesh::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it) { + for (auto v_it : _mesh.vertices()) { // Get the value of the property - double value = _texProp[*v_it]; + double value = _texProp[v_it]; // Mangle it with the predefined user options (including absolute, clamping, ...) value = convert.transform(value); // Write result to the OpenMesh texture coordinates ( 2d accessing the diagonal of a 2d texture) - texcoord[*v_it] = ACG::Vec2f(float(value), float(value) ); + texcoord[v_it] = ACG::Vec2f(float(value), float(value) ); } } diff --git a/TextureControl1DTextureHandlingT_impl.hh b/TextureControl1DTextureHandlingT_impl.hh index e6fadd04c89728bef3cdb64f64f249f59e161bed..8f53922a0559610a807bad6581c835b2625824dd 100644 --- a/TextureControl1DTextureHandlingT_impl.hh +++ b/TextureControl1DTextureHandlingT_impl.hh @@ -56,10 +56,10 @@ void TextureControlPlugin::copyTexture ( Texture& _texture , MeshT& _mesh, OpenM // Compute minimal and maximal value of the coordinates // Keep track of absolute values! - for ( typename MeshT::VertexIter v_it = _mesh.vertices_begin() ; v_it != _mesh.vertices_end(); ++v_it) { + for (auto v_it : _mesh.vertices()) { - max = std::max( _mesh.property(_texProp,*v_it) , max); - min = std::min( _mesh.property(_texProp,*v_it) , min); + max = std::max( _mesh.property(_texProp,v_it) , max); + min = std::min( _mesh.property(_texProp,v_it) , min); } @@ -69,15 +69,15 @@ void TextureControlPlugin::copyTexture ( Texture& _texture , MeshT& _mesh, OpenM TextureMath convert(_texture.parameters,min,max); - for ( typename MeshT::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it) { + for (auto v_it : _mesh.vertices()) { // Get the value of the property - double value = _mesh.property(_texProp, *v_it); + double value = _mesh.property(_texProp, v_it); // Mangle it with the predefined user options (including absolute, clamping, ...) value = convert.transform(value); // Write result to the OpenMesh texture coordinates ( 2d accessing the diagonal of a 2d texture) - _mesh.set_texcoord2D( *v_it, ACG::Vec2f(float(value), float(value) ) ); + _mesh.set_texcoord2D( v_it, ACG::Vec2f(float(value), float(value) ) ); } } @@ -90,10 +90,10 @@ void TextureControlPlugin::copyTexture ( Texture& _texture , MeshT& _mesh, OpenM // Compute minimal and maximal value of the coordinates // Keep track of absolute values! - for ( typename MeshT::HalfedgeIter h_it = _mesh.halfedges_begin() ; h_it != _mesh.halfedges_end(); ++h_it) { + for (auto h_it : _mesh.halfedges()) { - max = std::max( _mesh.property(_texProp,*h_it) , max); - min = std::min( _mesh.property(_texProp,*h_it) , min); + max = std::max( _mesh.property(_texProp,h_it) , max); + min = std::min( _mesh.property(_texProp,h_it) , min); } @@ -102,16 +102,16 @@ void TextureControlPlugin::copyTexture ( Texture& _texture , MeshT& _mesh, OpenM TextureMath convert(_texture.parameters,min,max); - for ( typename MeshT::HalfedgeIter h_it = _mesh.halfedges_begin(); h_it != _mesh.halfedges_end(); ++h_it) { + for (auto h_it : _mesh.halfedges()) { // Get the value of the property - double value = _mesh.property(_texProp, *h_it); + double value = _mesh.property(_texProp, h_it); // Mangle it with the predefined user options (including absolute, clamping, ...) value = convert.transform(value); // Write result to the OpenMesh texture coordinates ( 2d accessing the diagonal of a 2d texture) - _mesh.set_texcoord2D( *h_it, ACG::Vec2f(float(value), float(value) ) ); + _mesh.set_texcoord2D( h_it, ACG::Vec2f(float(value), float(value) ) ); } } diff --git a/TextureControl2DTextureHandlingOVMT_impl.hh b/TextureControl2DTextureHandlingOVMT_impl.hh index 80e40a464b2c8f6163372a96a0151d2f237634e4..803f485f69f2d15a41efe271ea1b29c03b14240a 100644 --- a/TextureControl2DTextureHandlingOVMT_impl.hh +++ b/TextureControl2DTextureHandlingOVMT_impl.hh @@ -53,8 +53,8 @@ void TextureControlPlugin::copyTexture ( Texture& /*_texture*/, VolumeMeshT& _me OpenVolumeMesh::TexCoordAttrib<ACG::Vec2f>& texcoord = _obj.texcoords(); - for ( OpenVolumeMesh::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it) - texcoord[*v_it] = _texProp[*v_it]; + for (auto v_it : _mesh.vertices()) + texcoord[v_it] = _texProp[v_it]; } diff --git a/TextureControl2DTextureHandlingT_impl.hh b/TextureControl2DTextureHandlingT_impl.hh index fea2cff8523e1185908e822bf068e2cb20fb4ec0..31d4f897273dff54aeb458527bfa18556216270e 100644 --- a/TextureControl2DTextureHandlingT_impl.hh +++ b/TextureControl2DTextureHandlingT_impl.hh @@ -51,13 +51,13 @@ void TextureControlPlugin::copyTexture ( Texture& /*_texture*/, MeshT& _mesh, Op if ( !_mesh.has_vertex_texcoords2D() ) _mesh.request_vertex_texcoords2D(); - for ( typename MeshT::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it) { + for (auto v_it : _mesh.vertices()) { // Get the value of the property - OpenMesh::Vec2d value = _mesh.property(_texProp, *v_it); + OpenMesh::Vec2d value = _mesh.property(_texProp, v_it); // Write result to the openmesh texture coordinates - _mesh.set_texcoord2D( *v_it, ACG::Vec2f(float(value[0]), float(value[1]) ) ); + _mesh.set_texcoord2D( v_it, ACG::Vec2f(float(value[0]), float(value[1]) ) ); } } @@ -67,13 +67,13 @@ void TextureControlPlugin::copyTexture ( Texture& /*_texture*/, MeshT& _mesh, Op if ( !_mesh.has_halfedge_texcoords2D() ) _mesh.request_halfedge_texcoords2D(); - for ( typename MeshT::HalfedgeIter h_it = _mesh.halfedges_begin(); h_it != _mesh.halfedges_end(); ++h_it) { + for (auto h_it : _mesh.halfedges()) { // Get the value of the property - OpenMesh::Vec2d value = _mesh.property(_texProp, *h_it); + OpenMesh::Vec2d value = _mesh.property(_texProp, h_it); // Write result to the openmesh texture coordinates - _mesh.set_texcoord2D( *h_it, ACG::Vec2f(float(value[0]), float(value[1]) ) ); + _mesh.set_texcoord2D( h_it, ACG::Vec2f(float(value[0]), float(value[1]) ) ); } } diff --git a/TextureControlHistogramsT_impl.hh b/TextureControlHistogramsT_impl.hh index 86def750a2ad480f8a37190a88ddab79527d8190..7584a3ba9c7a016647e123e3f05f629881bbfb27 100644 --- a/TextureControlHistogramsT_impl.hh +++ b/TextureControlHistogramsT_impl.hh @@ -52,7 +52,7 @@ void TextureControlPlugin::getOriginalHistogram(std::vector< double>& _x, std::v // _x.clear(); // _y.clear(); // -// for ( typename MeshT::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it) { +// for (auto v_it : _mesh.vertices()) { // double value = _mesh.property(_texProp, v_it); // }