Commit 418e5494 authored by Max Lyon's avatar Max Lyon

Merge branch 'iterators' into 'master'

Iterators

See merge request !65
parents 2782a7ef c1df4ffe
Pipeline #10930 passed with stage
in 6 minutes and 52 seconds
...@@ -18,6 +18,7 @@ Version X (?/?/?) ...@@ -18,6 +18,7 @@ Version X (?/?/?)
- Fix mesh copying by implementing copy constructors and clone methods - Fix mesh copying by implementing copy constructors and clone methods
- Fix bug in edge split of tetrahedral meshes - Fix bug in edge split of tetrahedral meshes
- Ensure that halfface iterators start with a boundary halffaces when cells are deleted - Ensure that halfface iterators start with a boundary halffaces when cells are deleted
- Added new iterators (VertexIHalfEdgeIter, VertexEdgeIter, VertexHalfFaceIter, EdgeHalfFaceIter, EdgeFaceIter, EdgeCellIter)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -561,6 +561,23 @@ std::vector<VertexHandle> TetrahedralMeshTopologyKernel::get_halfface_vertices(H ...@@ -561,6 +561,23 @@ std::vector<VertexHandle> TetrahedralMeshTopologyKernel::get_halfface_vertices(H
return vertices; return vertices;
} }
VertexHandle TetrahedralMeshTopologyKernel::halfface_opposite_vertex(HalfFaceHandle hfh) const
{
if (is_boundary(hfh)) {
return InvalidVertexHandle;
}
const std::vector<VertexHandle> base = get_halfface_vertices(hfh);
for (CellVertexIter it = cv_iter(incident_cell(hfh)); it.valid(); ++it) {
const VertexHandle vh = *it;
if (vh != base[0] && vh != base[1] && vh != base[2]) {
return vh;
}
}
return InvalidVertexHandle;
}
//======================================================================================== //========================================================================================
......
...@@ -90,6 +90,8 @@ public: ...@@ -90,6 +90,8 @@ public:
std::vector<VertexHandle> get_halfface_vertices(HalfFaceHandle hfh, VertexHandle vh) const; std::vector<VertexHandle> get_halfface_vertices(HalfFaceHandle hfh, VertexHandle vh) const;
std::vector<VertexHandle> get_halfface_vertices(HalfFaceHandle hfh, HalfEdgeHandle heh) const; std::vector<VertexHandle> get_halfface_vertices(HalfFaceHandle hfh, HalfEdgeHandle heh) const;
VertexHandle halfface_opposite_vertex(HalfFaceHandle hfh) const;
VertexHandle collapse_edge(HalfEdgeHandle _heh); VertexHandle collapse_edge(HalfEdgeHandle _heh);
protected: protected:
......
Markdown is supported
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