Class HalfEdge

java.lang.Object
ffx.numerics.quickhull.HalfEdge

public class HalfEdge extends Object
Represents the half-edges that surround each face in a counter-clockwise direction.
Since:
1.0
Author:
John E. Lloyd, Fall 2004, Michael J. Schnieders
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Face
    Triangular face associated with this half-edge.
    protected HalfEdge
    Next half-edge in the triangle.
    protected HalfEdge
    Half-edge associated with the opposite triangle adjacent to this edge.
    protected HalfEdge
    Previous half-edge in the triangle.
    protected Vertex
    The vertex associated with the head of this half-edge.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an uninitialized HalfEdge.
    Constructs a HalfEdge with head vertex v and left-hand triangular face f.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the triangular face located to the left of this half-edge.
    Gets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.
    Returns the half-edge opposite to this half-edge.
    Gets the value of the previous edge adjacent (clockwise) to this one within the triangle.
    Produces a string identifying this half-edge by the point index values of its tail and head vertices.
    Returns the head vertex associated with this half-edge.
    double
    Returns the length of this half-edge.
    double
    Returns the length squared of this half-edge.
    Returns the opposite triangular face associated with this half-edge.
    void
    Sets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.
    void
    Sets the half-edge opposite to this half-edge.
    void
    Sets the value of the previous edge adjacent (clockwise) to this one within the triangle.
    Returns the tail vertex associated with this half-edge.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • vertex

      protected Vertex vertex
      The vertex associated with the head of this half-edge.
    • face

      protected Face face
      Triangular face associated with this half-edge.
    • next

      protected HalfEdge next
      Next half-edge in the triangle.
    • prev

      protected HalfEdge prev
      Previous half-edge in the triangle.
    • opposite

      protected HalfEdge opposite
      Half-edge associated with the opposite triangle adjacent to this edge.
  • Constructor Details

    • HalfEdge

      public HalfEdge(Vertex v, Face f)
      Constructs a HalfEdge with head vertex v and left-hand triangular face f.
      Parameters:
      v - head vertex
      f - left-hand triangular face
    • HalfEdge

      public HalfEdge()
      Constructs an uninitialized HalfEdge. Fields may be set later via mutators.
  • Method Details

    • setNext

      public void setNext(HalfEdge edge)
      Sets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.
      Parameters:
      edge - next adjacent edge
    • getNext

      public HalfEdge getNext()
      Gets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.
      Returns:
      next adjacent edge
    • setPrev

      public void setPrev(HalfEdge edge)
      Sets the value of the previous edge adjacent (clockwise) to this one within the triangle.
      Parameters:
      edge - previous adjacent edge
    • getPrev

      public HalfEdge getPrev()
      Gets the value of the previous edge adjacent (clockwise) to this one within the triangle.
      Returns:
      previous adjacent edge
    • getFace

      public Face getFace()
      Returns the triangular face located to the left of this half-edge.
      Returns:
      left-hand triangular face
    • getOpposite

      public HalfEdge getOpposite()
      Returns the half-edge opposite to this half-edge.
      Returns:
      opposite half-edge
    • setOpposite

      public void setOpposite(HalfEdge edge)
      Sets the half-edge opposite to this half-edge.
      Parameters:
      edge - opposite half-edge
    • head

      public Vertex head()
      Returns the head vertex associated with this half-edge.
      Returns:
      head vertex
    • tail

      public Vertex tail()
      Returns the tail vertex associated with this half-edge.
      Returns:
      tail vertex
    • oppositeFace

      public Face oppositeFace()
      Returns the opposite triangular face associated with this half-edge.
      Returns:
      opposite triangular face
    • getVertexString

      public String getVertexString()
      Produces a string identifying this half-edge by the point index values of its tail and head vertices.
      Returns:
      identifying string
    • length

      public double length()
      Returns the length of this half-edge.
      Returns:
      half-edge length
    • lengthSquared

      public double lengthSquared()
      Returns the length squared of this half-edge.
      Returns:
      half-edge length squared