Adds the content of another HalfEdgeTable to the current table and adjusts the vertex indices of the merged table (not the base object's table), if desired.
Adds the content of another HalfEdgeTable to the current table and adjusts the vertex indices of the merged table (not the base object's table), if desired. The edge indices in the added table will be incremented to maintain correctness. The offset added to the edge indices will be returned so that any external references may be adjusted to match.
Create an edge for a single vertex, with the specified flip and next set.
Create an edge pointing to single vertex.
Create an edge pointing to single vertex. This edge will have no flip or next set.
Create three half edges that flip and point to each other in a triangle.
Create three half edges that flip and point to each other in a triangle.
The outer halfedge pointing at v1
It's up to the caller to set these edges in counter clockwise order
Create two half edges that both flip and point to each other
Create two half edges that both flip and point to each other
the half edge point at v2
Returns the vertex index for this half edge (the one in which it points to)
Returns the source vertex index for this half edge (the one in which it points from)
Joins together two sections of a mesh along a common edge.
Joins together two sections of a mesh along a common edge.
Occasionally, it will be necessary to merge two sections of a triangulation
along a common edge. This function accepts as arguments two edge
references which share the same endpoints. Specifically, e = [A -> B]
and opp = [B -> A]
where the flips of each edge are on the boundary of
the mesh. The end result of this function is that getFlip(e) = opp
and
getFlip(opp) = e
and the surrounding mesh is properly connected (assuming
the input meshes were correctly connected).
Provides an interactive, text based means to explore a mesh.
Provides an interactive, text based means to explore a mesh.
the initial edge for the navigation
a function that transforms vertex indices to Coordinates
a Map from Char to (String, Int => Int) where the character is the key that will select this operation in the interface, the string is descriptive of the operation, and the Int => Int function maps the current edge to a new edge, possibly with side effects
Returns the halfedge index of the halfedge you get from rotating this halfedge counter-clockwise from it's destination along the triangulation
Returns the halfedge index of the halfedge you get from rotating this halfedge counter-clockwise from it's source along the triangulation
Returns the halfedge index of the halfedge you get from rotating this halfedge clockwise from it's destination along the triangulation
Returns the halfedge index of the halfedge you get from rotating this halfedge clockwise from it's source along the triangulation
Sets the vertex index for this half edge (the one in which it points to)
Sets a half edge's flip half edge
Sets a half edge's next half edge
Sets the source vertex index for this half edge (the one in which it points from)
Mutable, non-thread safe class to keep track of half edges during Delaunay triangulation.
Half edge meshes are representations of piecewise linear, orientable, manifold surfaces, with or without boundary (no Mobius strips, edges are shared by at most two facets, every vertex has a single continuous fan of facets emanating from it). Every facet in the mesh is defined by a loop of half edges that are in a linked list, and every facet is joined to its neighboring facets by linking complementary half edges. In short, a half edge has three pieces of information: (1) a vertex reference (dest), (2) a complementary HalfEdge (flip), and (3) a pointer to the next edge on the boundary of a facet. These are sufficient to allow complete navigation of a mesh.
For convenience, derived navigation operations are provided. Consider the following diagram:
Starting from e1,
getNext
produces the sequence e1, e3, e7, e4, e1, ...Starting from e2,
getPrev
produces the sequence e2, e6, e8, e5, e2, ...getFlip(e4) == e5
andgetFlip(e5) == e4
rotCCWSrc(e4) == getFlip(e7)
rotCWSrc(e4) == e8
rotCCWDest(e4) == e2
rotCWDest(e4) == getFlip(e1)
getDest(e4) == v2
getSrc(e4) == getDest(e5) == v5
The HalfEdgeTable contains an Array[Int] in chunks of three where each of these chunks is specified as follows: [i,e1,e2] where i is the vertex of the halfedge (where the half edge 'points' to) e1 is the halfedge index of the flip of the halfedge (the halfedge that points to the source) e2 is the halfedge index of the next half edge (counter-clockwise of the triangle)