42 #ifndef OPENMESH_POLYCONNECTIVITY_INTERFACE_INCLUDE 43 #error Do not include this directly, include instead PolyConnectivity.hh 44 #endif//OPENMESH_POLYCONNECTIVITY_INTERFACE_INCLUDE 46 #include <OpenMesh/Core/Mesh/PolyConnectivity.hh> 54 struct SmartVertexHandle;
55 struct SmartHalfedgeHandle;
56 struct SmartEdgeHandle;
57 struct SmartFaceHandle;
79 template <
typename HandleType>
86 bool selected()
const;
100 template <
typename HandleType>
105 bool is_boundary()
const;
132 uint valence()
const;
134 bool is_manifold()
const;
142 SmartHalfedgeHandle next()
const;
144 SmartHalfedgeHandle prev()
const;
146 SmartHalfedgeHandle opp()
const;
199 uint valence()
const;
223 template <
typename HandleT>
232 template <
typename HandleType>
235 const auto& handle =
static_cast<const HandleType&
>(*this);
236 assert(handle.mesh() !=
nullptr);
237 return handle.mesh()->status(handle).feature();
240 template <
typename HandleType>
243 const auto& handle =
static_cast<const HandleType&
>(*this);
244 assert(handle.mesh() !=
nullptr);
245 return handle.mesh()->status(handle).selected();
248 template <
typename HandleType>
251 const auto& handle =
static_cast<const HandleType&
>(*this);
252 assert(handle.mesh() !=
nullptr);
253 return handle.mesh()->status(handle).tagged();
256 template <
typename HandleType>
259 const auto& handle =
static_cast<const HandleType&
>(*this);
260 assert(handle.mesh() !=
nullptr);
261 return handle.mesh()->status(handle).tagged2();
264 template <
typename HandleType>
267 const auto& handle =
static_cast<const HandleType&
>(*this);
268 assert(handle.mesh() !=
nullptr);
269 return handle.mesh()->status(handle).locked();
272 template <
typename HandleType>
275 const auto& handle =
static_cast<const HandleType&
>(*this);
276 assert(handle.mesh() !=
nullptr);
277 return handle.mesh()->status(handle).hidden();
280 template <
typename HandleType>
283 const auto& handle =
static_cast<const HandleType&
>(*this);
284 assert(handle.mesh() !=
nullptr);
285 return handle.mesh()->status(handle).deleted();
288 template <
typename HandleType>
291 const auto& handle =
static_cast<const HandleType&
>(*this);
292 assert(handle.mesh() !=
nullptr);
293 return handle.mesh()->is_boundary(handle);
298 assert(mesh() !=
nullptr);
299 return make_smart(mesh()->halfedge_handle(*
this), mesh());
314 assert(mesh() !=
nullptr);
315 return mesh()->valence(*
this);
320 assert(mesh() !=
nullptr);
321 return mesh()->is_manifold(*
this);
326 assert(mesh() !=
nullptr);
327 return make_smart(mesh()->next_halfedge_handle(*
this), mesh());
332 assert(mesh() !=
nullptr);
333 return make_smart(mesh()->prev_halfedge_handle(*
this), mesh());
338 assert(mesh() !=
nullptr);
339 return make_smart(mesh()->opposite_halfedge_handle(*
this), mesh());
344 assert(mesh() !=
nullptr);
345 return make_smart(mesh()->to_vertex_handle(*
this), mesh());
350 assert(mesh() !=
nullptr);
351 return make_smart(mesh()->from_vertex_handle(*
this), mesh());
356 assert(mesh() !=
nullptr);
357 return make_smart(mesh()->edge_handle(*
this), mesh());
362 assert(mesh() !=
nullptr);
363 return make_smart(mesh()->face_handle(*
this), mesh());
368 assert(mesh() !=
nullptr);
369 return make_smart(mesh()->halfedge_handle(*
this, _i), mesh());
389 return halfedge(_i).from();
409 assert(mesh() !=
nullptr);
410 return make_smart(mesh()->halfedge_handle(*
this), mesh());
415 assert(mesh() !=
nullptr);
416 return mesh()->valence(*
this);
bool is_manifold() const
Returns true iff (the mesh at) the vertex is two-manifold ?
Handle for a edge entity.
uint valence() const
Returns the valence of the face.
Handle for a face entity.
SmartHalfedgeHandle next() const
Returns next halfedge handle.
SmartVertexHandle v(unsigned int _i) const
Shorthand for vertex()
const PolyConnectivity * mesh() const
Get the underlying mesh of this handle.
SmartEdgeHandle edge() const
Returns incident edge of halfedge.
Handle for a halfedge entity.
int idx() const
Get the underlying index of this handle.
SmartHalfedgeHandle halfedge(unsigned int _i) const
Returns one of the two halfedges of the edge.
Base class for all smart handle types that contains status related methods.
SmartHalfedgeHandle halfedge() const
Returns one of the halfedges of the face.
bool feature() const
Returns true iff the handle is marked as feature.
Handle for a vertex entity.
bool tagged2() const
Returns true iff the handle is marked as tagged2.
SmartHalfedgeHandle in() const
Returns an incoming halfedge.
SmartHalfedgeHandle prev() const
Returns previous halfedge handle.
SmartVertexHandle v0() const
Shorthand for vertex(0)
SmartVertexHandle v1() const
Shorthand for vertex(1)
SmartHalfedgeHandle h(unsigned int _i) const
Shorthand for halfedge()
Base class for all smart handle types.
SmartHalfedgeHandle opp() const
Returns opposite halfedge handle.
Base class for all smart handle types that contains status related methods.
SmartVertexHandle from() const
Returns vertex at start of halfedge.
SmartVertexHandle make_smart(VertexHandle _vh, const PolyConnectivity *_mesh)
Creats a SmartVertexHandle from a VertexHandle and a Mesh.
SmartHalfedgeHandle h0() const
Shorthand for halfedge(0)
Generic class for iterator ranges.
SmartHalfedgeHandle halfedge() const
Returns an outgoing halfedge.
bool selected() const
Returns true iff the handle is marked as selected.
SmartHalfedgeHandle h1() const
Shorthand for halfedge(1)
SmartVertexHandle to() const
Returns vertex pointed to by halfedge.
SmartHalfedgeHandle out() const
Returns an outgoing halfedge.
SmartVertexHandle vertex(unsigned int _i) const
Returns one of the two incident vertices of the edge.
uint valence() const
Returns valence of the vertex.
Smart version of VertexHandle contains a pointer to the corresponding mesh and allows easier access t...
bool is_boundary() const
Returns true iff the handle is boundary.
bool tagged() const
Returns true iff the handle is marked as tagged.
Connectivity Class for polygonal meshes.
bool deleted() const
Returns true iff the handle is marked as deleted.
bool locked() const
Returns true iff the handle is marked as locked.
SmartFaceHandle face() const
Returns incident face of halfedge.
bool hidden() const
Returns true iff the handle is marked as hidden.