From f1543cdbf024a545d4abcb85b512f2661541671c Mon Sep 17 00:00:00 2001 From: Patrick Schmidt Date: Tue, 17 Mar 2020 17:11:27 +0100 Subject: [PATCH] Fix inline implementation of opposite_face_handle() (linker error) --- src/OpenMesh/Core/Mesh/PolyConnectivity.cc | 7 ------- src/OpenMesh/Core/Mesh/PolyConnectivity.hh | 8 +++----- src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh | 5 +++-- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc index 59d3c590..e2eaf45c 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc @@ -99,13 +99,6 @@ bool PolyConnectivity::is_manifold(VertexHandle _vh) const //----------------------------------------------------------------------------- -SmartFaceHandle PolyConnectivity::opposite_face_handle(HalfedgeHandle _heh) const -{ - return face_handle(make_smart(opposite_halfedge_handle(_heh), this)); -} - -//----------------------------------------------------------------------------- - void PolyConnectivity::adjust_outgoing_halfedge(VertexHandle _vh) { for (ConstVertexOHalfedgeIter vh_it=cvoh_iter(_vh); vh_it.is_valid(); ++vh_it) diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh index d4d0736d..000f6218 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.hh +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.hh @@ -611,6 +611,9 @@ public: inline SmartEdgeHandle edge_handle(SmartHalfedgeHandle _heh) const; inline SmartFaceHandle face_handle(SmartHalfedgeHandle _heh) const; + /// returns the face handle of the opposite halfedge + inline SmartFaceHandle opposite_face_handle(HalfedgeHandle _heh) const; + //@} /** \name Begin and end iterators @@ -1354,11 +1357,6 @@ public: bool is_manifold(VertexHandle _vh) const; /** @} */ - - // --- shortcuts --- - - /// returns the face handle of the opposite halfedge - inline SmartFaceHandle opposite_face_handle(HalfedgeHandle _heh) const; // --- misc --- diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh b/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh index bde8f4cf..4bf8aeda 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity_inline_impl.hh @@ -58,8 +58,8 @@ inline SmartHalfedgeHandle PolyConnectivity::opposite_halfedge_handle(SmartHalfe inline SmartHalfedgeHandle PolyConnectivity::ccw_rotated_halfedge_handle(SmartHalfedgeHandle _heh) const { return make_smart(ccw_rotated_halfedge_handle(HalfedgeHandle(_heh)), *this); } inline SmartHalfedgeHandle PolyConnectivity::cw_rotated_halfedge_handle(SmartHalfedgeHandle _heh) const { return make_smart(cw_rotated_halfedge_handle(HalfedgeHandle(_heh)), *this); } -inline SmartHalfedgeHandle PolyConnectivity::s_halfedge_handle(SmartEdgeHandle _eh, unsigned int _i) { return make_smart(ArrayKernel::s_halfedge_handle(EdgeHandle(_eh), _i), _eh.mesh()); } -inline SmartEdgeHandle PolyConnectivity::s_edge_handle(SmartHalfedgeHandle _heh) { return make_smart(ArrayKernel::s_edge_handle(HalfedgeHandle(_heh)), _heh.mesh()); } +inline SmartHalfedgeHandle PolyConnectivity::s_halfedge_handle(SmartEdgeHandle _eh, unsigned int _i) { return make_smart(ArrayKernel::s_halfedge_handle(EdgeHandle(_eh), _i), _eh.mesh()); } +inline SmartEdgeHandle PolyConnectivity::s_edge_handle(SmartHalfedgeHandle _heh) { return make_smart(ArrayKernel::s_edge_handle(HalfedgeHandle(_heh)), _heh.mesh()); } inline SmartHalfedgeHandle PolyConnectivity::halfedge_handle(SmartEdgeHandle _eh, unsigned int _i) const { return make_smart(halfedge_handle(EdgeHandle(_eh), _i), *this); } inline SmartEdgeHandle PolyConnectivity::edge_handle(SmartHalfedgeHandle _heh) const { return make_smart(edge_handle(HalfedgeHandle(_heh)), *this); } @@ -68,6 +68,7 @@ inline SmartHalfedgeHandle PolyConnectivity::halfedge_handle(SmartVertexHandle _ inline SmartFaceHandle PolyConnectivity::face_handle(SmartHalfedgeHandle _heh) const { return make_smart(face_handle(HalfedgeHandle(_heh)), *this); } +inline SmartFaceHandle PolyConnectivity::opposite_face_handle(HalfedgeHandle _heh) const { return make_smart(face_handle(opposite_halfedge_handle(_heh)), *this); } /// Generic class for vertex/halfedge/edge/face ranges.