Package ffx.numerics.quickhull
Class HalfEdge
java.lang.Object
ffx.numerics.quickhull.HalfEdge
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
FieldsModifier and TypeFieldDescriptionprotected 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 -
Method Summary
Modifier and TypeMethodDescriptiongetFace()
Returns the triangular face located to the left of this half-edge.getNext()
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.getPrev()
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.head()
Returns the head vertex associated with this half-edge.double
length()
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
setOpposite
(HalfEdge edge) 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.tail()
Returns the tail vertex associated with this half-edge.
-
Field Details
-
vertex
The vertex associated with the head of this half-edge. -
face
Triangular face associated with this half-edge. -
next
Next half-edge in the triangle. -
prev
Previous half-edge in the triangle. -
opposite
Half-edge associated with the opposite triangle adjacent to this edge.
-
-
Constructor Details
-
HalfEdge
Constructs a HalfEdge with head vertexv
and left-hand triangular facef
.- Parameters:
v
- head vertexf
- left-hand triangular face
-
HalfEdge
public HalfEdge()Constructs an uninitialized HalfEdge. Fields may be set later via mutators.
-
-
Method Details
-
setNext
Sets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.- Parameters:
edge
- next adjacent edge
-
getNext
Gets the value of the next edge adjacent (counter-clockwise) to this one within the triangle.- Returns:
- next adjacent edge
-
setPrev
Sets the value of the previous edge adjacent (clockwise) to this one within the triangle.- Parameters:
edge
- previous adjacent edge
-
getPrev
Gets the value of the previous edge adjacent (clockwise) to this one within the triangle.- Returns:
- previous adjacent edge
-
getFace
Returns the triangular face located to the left of this half-edge.- Returns:
- left-hand triangular face
-
getOpposite
Returns the half-edge opposite to this half-edge.- Returns:
- opposite half-edge
-
setOpposite
Sets the half-edge opposite to this half-edge.- Parameters:
edge
- opposite half-edge
-
head
Returns the head vertex associated with this half-edge.- Returns:
- head vertex
-
tail
Returns the tail vertex associated with this half-edge.- Returns:
- tail vertex
-
oppositeFace
Returns the opposite triangular face associated with this half-edge.- Returns:
- opposite triangular face
-
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
-