HE_Mesh2014  2.0.11
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
wblut.geom.Tri_HalfEdge Class Reference

Public Member Functions

 Tri_HalfEdge ()
 
 Tri_HalfEdge (final Tri_Point p)
 
 Tri_HalfEdge (final Tri_Point p, final int t)
 
 Tri_HalfEdge (final Tri_HalfEdge he)
 
Tri_HalfEdge getNext ()
 
Tri_HalfEdge getPrev ()
 
int getType ()
 
void setNext (final Tri_HalfEdge he)
 
void setSibling (final Tri_HalfEdge he)
 
void setType (final int type)
 
boolean isType (final int type)
 
boolean isFlagged (final int flag)
 
void constrain ()
 
void flag (final int flag)
 
void flagEdge (final int flag)
 
void unflag (final int flag)
 

Public Attributes

Tri_Point origin = null
 
Tri_HalfEdge next = null
 
Tri_HalfEdge sibling = null
 

Static Public Attributes

static final int AUXILARY = 0
 
static final int BOUNDARY = 1
 
static final int CONSTRAINT = 2
 
static final int FLAGS = 3
 
static final int FLAG_ALGORITHM = 0
 
static final int FLAG_DRAW = 1
 
static final int FLAG_READ = 2
 

Private Attributes

boolean flagged [] = new boolean[FLAGS]
 

Detailed Description

A halfedge is a directed segment that represents one side of an edge in the triangulation. Each halfedge has pointers to an origin point, the next halfedge, and its "sibling" halfedge, which points in the opposite direction but shares the same edge of the triangulation.

A valid triangulation will contain a 3-cycle of halfedges for each face, every interior edge will correspond to a sibling pair of halfeldges, and every boundary edge will correspond to a single halfedge with a null sibling pointer.

Author
Mark Howison

Constructor & Destructor Documentation

wblut.geom.Tri_HalfEdge.Tri_HalfEdge ( )

Constructs a halfedge with null pointers.

wblut.geom.Tri_HalfEdge.Tri_HalfEdge ( final Tri_Point  p)

Constructs a halfedge with origin p, and null next and sibling pointers.

Parameters
p
wblut.geom.Tri_HalfEdge.Tri_HalfEdge ( final Tri_Point  p,
final int  t 
)

Constructs a halfedge with origin p, type t, and null next and sibling pointers.

Parameters
p
t
wblut.geom.Tri_HalfEdge.Tri_HalfEdge ( final Tri_HalfEdge  he)

Shallow copies he. All pointers are copied, but not the underlying objects.

Parameters
he

Member Function Documentation

void wblut.geom.Tri_HalfEdge.constrain ( )

Sets this halfedge's type to CONSTRAINT.

void wblut.geom.Tri_HalfEdge.flag ( final int  flag)

Sets this halfedge's flag to true. Does not change the sibling's flag.

Parameters
flag
void wblut.geom.Tri_HalfEdge.flagEdge ( final int  flag)

Sets this halfedge and its sibling's flag to true.

Parameters
flag
Tri_HalfEdge wblut.geom.Tri_HalfEdge.getNext ( )

Gets the next halfedge.

Returns
Tri_HalfEdge wblut.geom.Tri_HalfEdge.getPrev ( )

Gets the previous halfedge whose next pointer points to this halfedge.

NOTE: In a valid triangulation, this could be accomplished by following three next pointers. However, this method is robust for non-triangular regions, and instead uses a potentially infinite while loop.

Returns
int wblut.geom.Tri_HalfEdge.getType ( )

Gets this halfedge's type (interior, boundary, constrained etc.). Use the static int flags to specify type.

Returns
boolean wblut.geom.Tri_HalfEdge.isFlagged ( final int  flag)

Tests whether this halfedge's flag is set to true.

Flags can be used to mark which edges or faces of a triangulation have been already processed by a procedure or algorithm.

Parameters
flag
Returns
boolean wblut.geom.Tri_HalfEdge.isType ( final int  type)

Tests if this halfedges is of type. Use the static int flags to specify type.

Parameters
type
Returns
void wblut.geom.Tri_HalfEdge.setNext ( final Tri_HalfEdge  he)

Sets the next halfedge pointer to he.

Parameters
he
void wblut.geom.Tri_HalfEdge.setSibling ( final Tri_HalfEdge  he)

Sets the sibling halfedge pointer to he.

Parameters
he
void wblut.geom.Tri_HalfEdge.setType ( final int  type)

Sets this halfedge's type (interior, boundary, constrained etc.). Use the static int flags to specify type.

Parameters
type
void wblut.geom.Tri_HalfEdge.unflag ( final int  flag)

Sets this halfedge's flag to false. Does not change the sibling's flag.

Parameters
flag

Member Data Documentation

final int wblut.geom.Tri_HalfEdge.AUXILARY = 0
static
final int wblut.geom.Tri_HalfEdge.BOUNDARY = 1
static
final int wblut.geom.Tri_HalfEdge.CONSTRAINT = 2
static
final int wblut.geom.Tri_HalfEdge.FLAG_ALGORITHM = 0
static
final int wblut.geom.Tri_HalfEdge.FLAG_DRAW = 1
static
final int wblut.geom.Tri_HalfEdge.FLAG_READ = 2
static
boolean wblut.geom.Tri_HalfEdge.flagged[] = new boolean[FLAGS]
private
final int wblut.geom.Tri_HalfEdge.FLAGS = 3
static
Tri_HalfEdge wblut.geom.Tri_HalfEdge.next = null
Tri_Point wblut.geom.Tri_HalfEdge.origin = null
Tri_HalfEdge wblut.geom.Tri_HalfEdge.sibling = null

The documentation for this class was generated from the following file: