convexhull3d
Class HalfEdge

java.lang.Object
  |
  +--convexhull3d.HalfEdge

public class HalfEdge
extends java.lang.Object

Represents the half-edges that surround each triangular face in a counter-clockwise direction.

Author:
John E. Lloyd, Winter 2003

Constructor Summary
HalfEdge(SpatialPoint v, Triangle f)
          Constructs a HalfEdge with head vertex v and left-hand triangular face f.
 
Method Summary
 Triangle getFace()
          Returns the triangular face located to the left of this half-edge.
 HalfEdge getNext()
          Gets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.
 HalfEdge getOpposite()
          Returns the half-edge opposite to this half-edge.
 HalfEdge getPrev()
          Gets the value of the previous edge adjacent (clockwise) to this one within the triangle.
 SpatialPoint head()
          Returns the head vertex associated with this half-edge.
 Triangle oppositeFace()
          Returns the opposite triangular face associated with this half-edge.
 void setNext(HalfEdge edge)
          Sets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.
 void setOpposite(HalfEdge edge)
          Sets the half-edge opposite to this half-edge.
 void setPrev(HalfEdge edge)
          Sets the value of the previous edge adjacent (clockwise) to this one within the triangle.
 SpatialPoint tail()
          Returns the tail vertex associated with this half-edge.
 java.lang.String vertexString()
          Produces a string identifying this half-edge by the point index values of its tail and head vertices.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HalfEdge

public HalfEdge(SpatialPoint v,
                Triangle f)
Constructs a HalfEdge with head vertex v and left-hand triangular face f.

Parameters:
v - head vertex
f - left-hand triangular face
Method Detail

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 Triangle 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 SpatialPoint head()
Returns the head vertex associated with this half-edge.

Returns:
head vertex

tail

public SpatialPoint tail()
Returns the tail vertex associated with this half-edge.

Returns:
tail vertex

oppositeFace

public Triangle oppositeFace()
Returns the opposite triangular face associated with this half-edge.

Returns:
opposite triangular face

vertexString

public java.lang.String vertexString()
Produces a string identifying this half-edge by the point index values of its tail and head vertices.

Returns:
identifying string