diff --git a/FileOFF.cc b/FileOFF.cc index f9f947c1ae6740eac8f7d4d6dfab1cad002a32d2..45fcf5c6f00bce050953fd87f75eae0fcb07be2e 100644 --- a/FileOFF.cc +++ b/FileOFF.cc @@ -1302,7 +1302,7 @@ void FileOFFPlugin::backupTextureCoordinates(MeshT& _mesh) { _mesh.add_property(oldVertexCoords, "Original Per Vertex Texture Coords"); for (typename MeshT::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it) - _mesh.property(oldVertexCoords, v_it) = _mesh.texcoord2D(v_it); + _mesh.property(oldVertexCoords, *v_it) = _mesh.texcoord2D(*v_it); } @@ -1314,7 +1314,7 @@ void FileOFFPlugin::backupTextureCoordinates(MeshT& _mesh) { _mesh.add_property(oldHalfedgeCoords,"Original Per Face Texture Coords"); for (typename MeshT::HalfedgeIter he_it = _mesh.halfedges_begin(); he_it != _mesh.halfedges_end(); ++he_it) - _mesh.property(oldHalfedgeCoords, he_it) = _mesh.texcoord2D(he_it); + _mesh.property(oldHalfedgeCoords, *he_it) = _mesh.texcoord2D(*he_it); } } diff --git a/FileOFFT.cc b/FileOFFT.cc index 9a8960d3b662a8bcb2660674a61814a3095aaa79..bc36821a148a22890d87e6d2260bba21e96a1c81 100644 --- a/FileOFFT.cc +++ b/FileOFFT.cc @@ -134,12 +134,12 @@ bool FileOFFPlugin::writeASCIIData(std::ostream& _out, MeshT& _mesh ) { _out << "\n"; // Write vertex p[0] p[1] p[2] - p = _mesh.point(vit.handle()); + p = _mesh.point(*vit); _out << p[0] << " " << p[1] << " " << p[2]; // Write vertex normals if(_mesh.has_vertex_normals() && (userWriteOptions_ & OFFImporter::VERTEXNORMAL)) { - n = _mesh.normal(vit.handle()); + n = _mesh.normal(*vit); _out << " " << n[0] << " " << n[1] << " " << n[2]; } @@ -147,13 +147,13 @@ bool FileOFFPlugin::writeASCIIData(std::ostream& _out, MeshT& _mesh ) { // Note: Vertex colors always have only three components. // This has to be determined since it can not be read dynamically in binary files. if(_mesh.has_vertex_colors() && (userWriteOptions_ & OFFImporter::VERTEXCOLOR)) { - c = OpenMesh::color_cast (_mesh.color(vit.handle())); + c = OpenMesh::color_cast (_mesh.color(*vit)); _out << " " << std::showpoint << c[0] << " " << std::showpoint << c[1] << " " << std::showpoint << c[2] << " " << std::showpoint << c[3]; } // Write vertex texcoords if(_mesh.has_vertex_texcoords2D() && (userWriteOptions_ & OFFImporter::VERTEXTEXCOORDS)) { - t = _mesh.texcoord2D(vit.handle()); + t = _mesh.texcoord2D(*vit); _out << " " << t[0] << " " << t[1]; } } @@ -168,19 +168,19 @@ bool FileOFFPlugin::writeASCIIData(std::ostream& _out, MeshT& _mesh ) { _out << "\n"; // Write face valence - _out << _mesh.valence(fit.handle()); + _out << _mesh.valence(*fit); // Get face-vertex iterator - fvit = _mesh.fv_iter(fit.handle()); + fvit = _mesh.fv_iter(*fit); // Write vertex indices - for(;fvit; ++fvit) { - _out << " " << fvit.handle().idx(); + for(;fvit.is_valid(); ++fvit) { + _out << " " << fvit->idx(); } // Write face colors if(_mesh.has_face_colors() && (userWriteOptions_ & OFFImporter::FACECOLOR ) ) { - c = OpenMesh::color_cast (_mesh.color(fit.handle())); + c = OpenMesh::color_cast (_mesh.color(*fit)); _out << " " << std::showpoint << c[0] << " " << std::showpoint << c[1] << " " << std::showpoint << c[2]; if(userWriteOptions_ & OFFImporter::COLORALPHA) _out << " " << std::showpoint << c[3]; @@ -212,14 +212,14 @@ bool FileOFFPlugin::writeBinaryData(std::ostream& _out, MeshT& _mesh ){ for(; vit != end_vit; ++vit) { // Write vertex p[0] p[1] p[2] - p = _mesh.point(vit.handle()); + p = _mesh.point(*vit); writeValue(_out, p[0]); writeValue(_out, p[1]); writeValue(_out, p[2]); // Write vertex normals if(_mesh.has_vertex_normals() && (userWriteOptions_ & OFFImporter::VERTEXNORMAL)) { - n = _mesh.normal(vit.handle()); + n = _mesh.normal(*vit); writeValue(_out, n[0]); writeValue(_out, n[1]); writeValue(_out, n[2]); @@ -229,7 +229,7 @@ bool FileOFFPlugin::writeBinaryData(std::ostream& _out, MeshT& _mesh ){ // Note: Vertex colors always have only three components. // This has to be determined since it can not be read dynamically in binary files. if(_mesh.has_vertex_colors() && (userWriteOptions_ & OFFImporter::VERTEXCOLOR)) { - c = OpenMesh::color_cast (_mesh.color(vit.handle())); + c = OpenMesh::color_cast (_mesh.color(*vit)); writeValue(_out, c[0]); writeValue(_out, c[1]); writeValue(_out, c[2]); @@ -237,7 +237,7 @@ bool FileOFFPlugin::writeBinaryData(std::ostream& _out, MeshT& _mesh ){ // Write vertex texcoords if(_mesh.has_vertex_texcoords2D() && (userWriteOptions_ & OFFImporter::VERTEXTEXCOORDS)) { - t = _mesh.texcoord2D(vit.handle()); + t = _mesh.texcoord2D(*vit); writeValue(_out, t[0]); writeValue(_out, t[1]); } @@ -251,14 +251,14 @@ bool FileOFFPlugin::writeBinaryData(std::ostream& _out, MeshT& _mesh ){ for(; fit != end_fit; ++fit) { // Write face valence - writeValue(_out, _mesh.valence(fit.handle())); + writeValue(_out, _mesh.valence(*fit)); // Get face-vertex iterator - fvit = _mesh.fv_iter(fit.handle()); + fvit = _mesh.fv_iter(*fit); // Write vertex indices - for(;fvit; ++fvit) { - writeValue(_out, fvit.handle().idx()); + for(;fvit.is_valid(); ++fvit) { + writeValue(_out, fvit->idx()); } // Write face colors @@ -269,7 +269,7 @@ bool FileOFFPlugin::writeBinaryData(std::ostream& _out, MeshT& _mesh ){ else writeValue(_out, (uint)3); // Color itself - c = OpenMesh::color_cast (_mesh.color(fit.handle())); + c = OpenMesh::color_cast (_mesh.color(*fit)); writeValue(_out, c[0]); writeValue(_out, c[1]); writeValue(_out, c[2]); diff --git a/OFFImporter.cc b/OFFImporter.cc index 03ebbc21861569ac4fafd77d20eff9728e3264ef..dd63e999f16bcd05924aa75c2175d7d33ff7f259 100644 --- a/OFFImporter.cc +++ b/OFFImporter.cc @@ -362,8 +362,8 @@ void OFFImporter::finish() { // Mark edges of failed face as non-two-manifold if (triMesh()->has_edge_status()) { TriMesh::FaceEdgeIter fe_it = triMesh()->fe_iter(fh); - for(; fe_it; ++fe_it) { - triMesh()->status(fe_it).set_fixed_nonmanifold(true); + for(; fe_it.is_valid(); ++fe_it) { + triMesh()->status(*fe_it).set_fixed_nonmanifold(true); } } @@ -401,8 +401,8 @@ void OFFImporter::finish() { // Mark edges of failed face as non-two-manifold if (polyMesh()->has_edge_status()) { TriMesh::FaceEdgeIter fe_it = polyMesh()->fe_iter(fh); - for(; fe_it; ++fe_it) { - polyMesh()->status(fe_it).set_fixed_nonmanifold(true); + for(; fe_it.is_valid(); ++fe_it) { + polyMesh()->status(*fe_it).set_fixed_nonmanifold(true); } }