Class Halfedge<X extends Point_>

java.lang.Object
Jcg.polyhedron.Halfedge<X>

public class Halfedge<X extends Point_> extends Object
Class for representing half-edges (half-edge representation of a surface mesh)
Author:
Code by Luca Castelli Aleardi (INF555/562, 2012-2020)
  • Field Details

    • next

      public Halfedge<X extends Point_> next
      a reference to next half-edge (in ccw direction) in the same incident face
    • opposite

      public Halfedge<X extends Point_> opposite
      a reference to opposite half-edge, lying in the neighboring face
    • vertex

      public Vertex<X extends Point_> vertex
      a reference to target of this half-edge
    • prev

      public Halfedge<X extends Point_> prev
      a reference to previous half-edge (in ccw direction) in the same incident face.
      Remark: storing this reference is redundant, but makes the data structure faster when dealing with polygonal faces.
    • face

      public Face<X extends Point_> face
      a reference to face incident to (containing) this half-edge.
      Remark: this reference can be NULL, when the half-edge is a boundary edge.
    • tag

      public int tag
      an integer that can be used to tag half-edges (useful for dealing with colors, ...)
    • index

      public int index
      an integer that can be used to index half-edges (useful for some applications)
  • Constructor Details

    • Halfedge

      public Halfedge()
  • Method Details

    • setNext

      public void setNext(Halfedge<X> e)
    • setOpposite

      public void setOpposite(Halfedge<X> e)
    • setPrev

      public void setPrev(Halfedge<X> e)
    • setVertex

      public void setVertex(Vertex<X> v)
    • setFace

      public void setFace(Face<X> f)
    • getNext

      public Halfedge<X> getNext()
    • getOpposite

      public Halfedge<X> getOpposite()
    • getPrev

      public Halfedge<X> getPrev()
    • getVertex

      public Vertex<X> getVertex()
    • getFace

      public Face<X> getFace()
    • toString

      public String toString()
      Overrides:
      toString in class Object