52 #include <OpenMesh/Core/Mesh/TriConnectivity.hh> 57 TriConnectivity::FaceHandle
73 vhandles[0] = _vertex_handles[0];
81 vhandles[1] = _vertex_handles[i];
82 vhandles[2] = _vertex_handles[++i];
94 return add_face(&_vhandles.front(), _vhandles.size());
111 if (
status(edge_handle(v0v1)).deleted() )
129 h1 = next_halfedge_handle(v0v1);
130 h2 = next_halfedge_handle(h1);
132 vl = to_vertex_handle(h1);
146 h1 = next_halfedge_handle(v1v0);
147 h2 = next_halfedge_handle(h1);
149 vr = to_vertex_handle(h1);
157 if (vl == vr)
return false;
162 for (vv_it =
vv_iter(v0); vv_it.is_valid(); ++vv_it)
165 for (vv_it =
vv_iter(v1); vv_it.is_valid(); ++vv_it)
168 for (vv_it =
vv_iter(v0); vv_it.is_valid(); ++vv_it)
169 if (
status(*vv_it).
tagged() && *vv_it != vl && *vv_it != vr)
207 vlv1 = prev_halfedge_handle(halfedge_handle(v1));
209 vrv1 = prev_halfedge_handle(halfedge_handle(v1));
236 set_next_halfedge_handle(prev_halfedge_handle(h0), o1);
237 set_next_halfedge_handle(o1, next_halfedge_handle(h0));
238 set_next_halfedge_handle(h1, h0);
239 set_next_halfedge_handle(h0, h1);
242 set_face_handle(o1, f0);
243 set_face_handle(h0, f1);
244 set_face_handle(h1, f1);
247 set_halfedge_handle(f1, h0);
249 set_halfedge_handle(f0, o1);
268 assert( v1 == to_vertex_handle(_h1));
276 set_halfedge_handle(v0, v0v1);
277 set_halfedge_handle(v1, v1v0);
281 set_next_halfedge_handle(v0v1, next_halfedge_handle(_h0));
282 set_next_halfedge_handle(_h0, v0v1);
283 set_next_halfedge_handle(v1v0, next_halfedge_handle(_h1));
284 set_next_halfedge_handle(_h1, v1v0);
289 set_vertex_handle(*vih_it, v0);
293 set_face_handle(v0v1, face_handle(_h0));
294 set_face_handle(v1v0, face_handle(_h1));
298 if (face_handle(v0v1).is_valid())
299 set_halfedge_handle(face_handle(v0v1), v0v1);
300 if (face_handle(v1v0).is_valid())
301 set_halfedge_handle(face_handle(v1v0), v1v0);
326 VertexHandle ah = to_vertex_handle(next_halfedge_handle(hh));
327 VertexHandle bh = to_vertex_handle(next_halfedge_handle(oh));
366 set_vertex_handle(a0, va1);
367 set_vertex_handle(b0, vb1);
369 set_next_halfedge_handle(a0, a2);
370 set_next_halfedge_handle(a2, b1);
371 set_next_halfedge_handle(b1, a0);
373 set_next_halfedge_handle(b0, b2);
374 set_next_halfedge_handle(b2, a1);
375 set_next_halfedge_handle(a1, b0);
377 set_face_handle(a1, fb);
378 set_face_handle(b1, fa);
380 set_halfedge_handle(fa, a0);
381 set_halfedge_handle(fb, b0);
383 if (halfedge_handle(va0) == b0)
384 set_halfedge_handle(va0, a1);
385 if (halfedge_handle(vb0) == a0)
386 set_halfedge_handle(vb0, b1);
405 set_halfedge_handle(_vh, h0);
406 set_vertex_handle(o0, _vh);
419 set_halfedge_handle(f0, h0);
420 set_halfedge_handle(f1, h2);
422 set_face_handle(h1, f0);
423 set_face_handle(t0, f0);
424 set_face_handle(h0, f0);
426 set_face_handle(h2, f1);
427 set_face_handle(t1, f1);
428 set_face_handle(e0, f1);
430 set_next_halfedge_handle(h0, h1);
431 set_next_halfedge_handle(h1, t0);
432 set_next_halfedge_handle(t0, h0);
434 set_next_halfedge_handle(e0, h2);
435 set_next_halfedge_handle(h2, t1);
436 set_next_halfedge_handle(t1, e0);
440 set_next_halfedge_handle(prev_halfedge_handle(h0), t1);
441 set_next_halfedge_handle(t1, h0);
457 set_halfedge_handle(f2, o1);
458 set_halfedge_handle(f3, o0);
460 set_face_handle(o1, f2);
461 set_face_handle(t2, f2);
462 set_face_handle(e1, f2);
464 set_face_handle(o2, f3);
465 set_face_handle(o0, f3);
466 set_face_handle(e2, f3);
468 set_next_halfedge_handle(e1, o1);
469 set_next_halfedge_handle(o1, t2);
470 set_next_halfedge_handle(t2, e1);
472 set_next_halfedge_handle(o0, e2);
473 set_next_halfedge_handle(e2, o2);
474 set_next_halfedge_handle(o2, o0);
478 set_next_halfedge_handle(e1, next_halfedge_handle(o0));
479 set_next_halfedge_handle(o0, e1);
480 set_halfedge_handle(_vh, e1);
483 if (halfedge_handle(v2) == h0)
484 set_halfedge_handle(v2, t1);
HalfedgeHandle vertex_split(VertexHandle v0, VertexHandle v1, VertexHandle vl, VertexHandle vr)
Vertex Split: inverse operation to collapse().
void split_copy(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)
void adjust_outgoing_halfedge(VertexHandle _vh)
void flip(EdgeHandle _eh)
HalfedgeHandle insert_edge(VertexHandle _vh, HalfedgeHandle _h0, HalfedgeHandle _h1)
Helper for vertex split.
bool is_boundary(HalfedgeHandle _heh) const
Check if the halfedge is at the boundary.
VertexVertexIter vv_iter(VertexHandle _vh)
vertex - vertex circulator
bool is_flip_ok(EdgeHandle _eh) const
Check whether flipping _eh is topologically correct.
VertexEdgeIter ve_iter(VertexHandle _vh)
vertex - edge circulator
Handle for a edge entity.
void split(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)
HalfedgeHandle find_halfedge(VertexHandle _start_vh, VertexHandle _end_vh) const
Find halfedge from _vh0 to _vh1. Returns invalid handle if not found.
HalfedgeHandle insert_loop(HalfedgeHandle _hh)
Helper for vertex split.
bool is_valid() const
The handle is valid iff the index is not equal to -1.
FaceHandle add_face(const std::vector< VertexHandle > &_vhandles)
Add and connect a new face.
bool tagged() const
is tagged ?
const StatusInfo & status(VertexHandle _vh) const
Status Query API.
Handle for a halfedge entity.
static const FaceHandle InvalidFaceHandle
Invalid handle.
Handle for a vertex entity.
FaceHandle add_face(const VertexHandle *_vhandles, size_t _vhs_size)
Add a face with arbitrary valence to the triangle mesh.
VertexIHalfedgeIter vih_iter(VertexHandle _vh)
vertex - incoming halfedge circulator
Handle for a face entity.
void copy_all_properties(VertexHandle _vh_from, VertexHandle _vh_to, bool _copyBuildIn=false)
bool is_collapse_ok(HalfedgeHandle _heh)
void set_tagged(bool _b)
set tagged