Commit dc97b4db authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'Plugin-FileOM-updated' into 'master'

new iterators and circulators

See merge request !2
parents 6aec2b62 fb982024
......@@ -135,11 +135,11 @@ int FileOMPlugin::loadObject(QString _filename) {
if(!PluginFunctions::getObject(objectId, object))
return -1;
for ( PolyMesh::FaceIter f_it = object->mesh()->faces_begin(); f_it != object->mesh()->faces_end() ; ++f_it) {
for (auto f_it : object->mesh()->faces()) {
// Count number of vertices for the current face
uint count = 0;
for ( PolyMesh::FaceVertexIter fv_it( *(object->mesh()),*f_it); fv_it.is_valid(); ++fv_it )
for (auto fv_it : f_it.vertices())
++count;
// Check if it is a triangle. If not, this is really a poly mesh
......@@ -167,11 +167,11 @@ int FileOMPlugin::loadObject(QString _filename) {
if(!PluginFunctions::getObject(objectId, object))
return -1;
for ( PolyMesh::FaceIter f_it = object->mesh()->faces_begin(); f_it != object->mesh()->faces_end() ; ++f_it) {
for (auto f_it : object->mesh()->faces()) {
// Count number of vertices for the current face
uint count = 0;
for ( PolyMesh::FaceVertexIter fv_it( *(object->mesh()),*f_it); fv_it.is_valid(); ++fv_it )
for (auto fv_it : f_it.vertices())
++count;
// Check if it is a triangle. If not, this is really a poly mesh
......@@ -447,8 +447,8 @@ void FileOMPlugin::backupTextureCoordinates(MeshT& _mesh) {
if (!_mesh.get_property_handle(oldVertexCoords, "Original Per Vertex Texture Coords"))
_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);
for (auto v_it : _mesh.vertices())
_mesh.property(oldVertexCoords, v_it) = _mesh.texcoord2D(v_it);
}
......@@ -459,8 +459,8 @@ void FileOMPlugin::backupTextureCoordinates(MeshT& _mesh) {
if (!_mesh.get_property_handle(oldHalfedgeCoords,"Original Per Face Texture Coords"))
_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);
for (auto he_it : _mesh.halfedges())
_mesh.property(oldHalfedgeCoords, he_it) = _mesh.texcoord2D(he_it);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment