Class

geotrellis.vector.mesh

HalfEdgeTable

Related Doc: package mesh

Permalink

class HalfEdgeTable extends Serializable

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:

v1 <---------- v2 <---------- v3
^|     e1      ^|     e2      ^|
||             ||             ||
|| e3       e4 || e5       e6 ||
||             ||             ||
|V     e7      |V     e8      |V
v4 ----------> v5 ----------> v6

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 and getFlip(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)

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HalfEdgeTable
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HalfEdgeTable(_size: Int)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def allVertices(): Iterable[Int]

    Permalink
  5. def appendTable(that: HalfEdgeTable, reindex: (Int) ⇒ Int = x => x): Int

    Permalink

    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.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def createHalfEdge(v: Int, flip: Int, next: Int): Int

    Permalink

    Create an edge for a single vertex, with the specified flip and next set.

  9. def createHalfEdge(v: Int): Int

    Permalink

    Create an edge pointing to single vertex.

    Create an edge pointing to single vertex. This edge will have no flip or next set.

  10. def createHalfEdges(v1: Int, v2: Int, v3: Int): Int

    Permalink

    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.

    returns

    The outer halfedge pointing at v1

    Note

    It's up to the caller to set these edges in counter clockwise order

  11. def createHalfEdges(v1: Int, v2: Int): Int

    Permalink

    Create two half edges that both flip and point to each other

    Create two half edges that both flip and point to each other

    returns

    the half edge point at v2

  12. def edgeIncidentTo(i: Int): Int

    Permalink
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def foreachInLoop(e0: Int)(f: (Int) ⇒ Unit): Unit

    Permalink
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getDest(e: Int): Int

    Permalink

    Returns the vertex index for this half edge (the one in which it points to)

  19. def getFlip(e: Int): Int

    Permalink
  20. def getNext(e: Int): Int

    Permalink
  21. def getPrev(e: Int): Int

    Permalink
  22. def getSrc(e: Int): Int

    Permalink

    Returns the source vertex index for this half edge (the one in which it points from)

  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def join(e: Int, opp: Int): Unit

    Permalink
  26. def killEdge(e: Int): Unit

    Permalink
  27. def mapOverLoop[T](e0: Int)(f: (Int) ⇒ T): Seq[T]

    Permalink
  28. def maxEdgeIndex(): Int

    Permalink

    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).

  29. def navigate(e0: Int, trans: (Int) ⇒ Coordinate, addedCmds: Map[Char, (String, (Int) ⇒ Int)]): Unit

    Permalink

    Provides an interactive, text based means to explore a mesh.

    Provides an interactive, text based means to explore a mesh.

    e0

    the initial edge for the navigation

    trans

    a function that transforms vertex indices to Coordinates

    addedCmds

    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

  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. def neighborsOf(vi: Int): Seq[Int]

    Permalink
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. def onBoundary(vi: Int, boundary: Int): Boolean

    Permalink
  35. def registerFace(e: Int): Unit

    Permalink
  36. def reindexVertices(reindex: (Int) ⇒ Int): Unit

    Permalink
  37. def removeIncidentEdge(i: Int): Map[Int, Int]

    Permalink
  38. def rotCCWDest(e: Int): Int

    Permalink

    Returns the halfedge index of the halfedge you get from rotating this halfedge counter-clockwise from it's destination along the triangulation

  39. def rotCCWSrc(e: Int): Int

    Permalink

    Returns the halfedge index of the halfedge you get from rotating this halfedge counter-clockwise from it's source along the triangulation

  40. def rotCWDest(e: Int): Int

    Permalink

    Returns the halfedge index of the halfedge you get from rotating this halfedge clockwise from it's destination along the triangulation

  41. def rotCWSrc(e: Int): Int

    Permalink

    Returns the halfedge index of the halfedge you get from rotating this halfedge clockwise from it's source along the triangulation

  42. def setDest(e: Int, v: Int): Unit

    Permalink

    Sets the vertex index for this half edge (the one in which it points to)

  43. def setFlip(e: Int, flip: Int): Unit

    Permalink

    Sets a half edge's flip half edge

  44. def setIncidentEdge(i: Int, e: Int): Map[Int, Int]

    Permalink
  45. def setNext(e: Int, next: Int): Unit

    Permalink

    Sets a half edge's next half edge

  46. def setSrc(e: Int, v: Int): Unit

    Permalink

    Sets the source vertex index for this half edge (the one in which it points from)

  47. def showLoop(e0: Int): Unit

    Permalink
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  50. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped