HE_Mesh  6.0.1
wblut.hemesh.HE_Path Class Reference
+ Inheritance diagram for wblut.hemesh.HE_Path:

Public Member Functions

 HE_Path (final HE_Halfedge loop)
 
 HE_Path (final HE_Face face)
 
 HE_Path (final HE_Vertex v)
 
 HE_Path (final List< HE_Halfedge > halfedges, final boolean loop)
 
long key ()
 
int getPathOrder ()
 
double getPathLength ()
 
double[] getPathIncLengths ()
 
List< HE_HalfedgegetHalfedges ()
 
List< HE_VertexgetPathVertices ()
 
List< HE_HalfedgegetPathEdges ()
 
HE_PathHalfedge getPathHalfedge ()
 
void setPathHalfedge (final HE_PathHalfedge phalfedge)
 
void clearPathHalfedge ()
 
List< HE_FacegetPathInnerFaces ()
 
List< HE_FacegetPathOuterFaces ()
 
String toString ()
 
void clear ()
 
boolean isLoop ()
 
boolean isCut ()
 
void clearPrecomputed ()
 
- Public Member Functions inherited from wblut.hemesh.HE_MeshElement
 HE_MeshElement ()
 
void clearVisited ()
 
void setVisited ()
 
void setVisited (final boolean b)
 
boolean isVisited ()
 
void setVisible (final boolean b)
 
boolean isVisible ()
 
int hashCode ()
 
boolean equals (final Object other)
 
void copyProperties (final HE_MeshElement el)
 
int getColor ()
 
void setColor (final int color)
 
- Public Member Functions inherited from wblut.hemesh.HE_Element
 HE_Element ()
 
final void setUserLabel (final int label)
 
final long getKey ()
 
final int getInternalLabel ()
 
final int getUserLabel ()
 
int hashCode ()
 
boolean equals (final Object other)
 
void copyProperties (final HE_Element el)
 

Static Public Member Functions

static HE_Path getShortestPath (final HE_Vertex v0, final HE_Vertex v1, final HE_Mesh mesh)
 

Protected Attributes

HE_PathHalfedge _phalfedge
 
- Protected Attributes inherited from wblut.hemesh.HE_MeshElement
volatile boolean visited
 
boolean visible
 
int color
 
- Protected Attributes inherited from wblut.hemesh.HE_Element
final long key
 
int internalLabel
 
int userLabel
 

Private Member Functions

void createFromList (final List< HE_Halfedge > halfedges, final boolean loop)
 

Additional Inherited Members

- Protected Member Functions inherited from wblut.hemesh.HE_MeshElement
abstract void clear ()
 
- Protected Member Functions inherited from wblut.hemesh.HE_Element
final void setInternalLabel (final int label)
 
abstract void clear ()
 
abstract void clearPrecomputed ()
 
- Static Protected Attributes inherited from wblut.hemesh.HE_MeshElement
static final WB_GeometryFactory gf = new WB_GeometryFactory()
 
static final WB_ProgressTracker tracker = WB_ProgressTracker.instance()
 
- Static Protected Attributes inherited from wblut.hemesh.HE_Element
static AtomicLong currentKey = new AtomicLong(0)
 

Detailed Description

A HE_Path is a sequence of edges, or rather halfedges, in a mesh. It can be a loop or open.

A HE_Path consists of a double linked list of HE_PathHalfedges, a wrapper for a HE_Halfedge that can have different connectivity than the HE_Halfedge itself. The constructors do not check if the path is valid, i.e. a non-interrupted loop or sequence of halfedges.

Author
Frederik Vanhoutte, W:Blut

Constructor & Destructor Documentation

wblut.hemesh.HE_Path.HE_Path ( final HE_Halfedge  loop)

Create a looping path using the halfedge 'loop' as starting point. The path is created by calling getNextInFace() until 'loop' is reached.

Parameters
loopstarting halfegde;

References wblut.hemesh.HE_Path._phalfedge, wblut.hemesh.HE_Halfedge.getNextInFace(), wblut.hemesh.HE_PathHalfedge.setNext(), and wblut.hemesh.HE_PathHalfedge.setPrev().

wblut.hemesh.HE_Path.HE_Path ( final HE_Face  face)

Create a looping path from a single face .

Parameters
facesingle face

References wblut.hemesh.HE_Face.getHalfedge().

wblut.hemesh.HE_Path.HE_Path ( final HE_Vertex  v)
wblut.hemesh.HE_Path.HE_Path ( final List< HE_Halfedge halfedges,
final boolean  loop 
)

Create a path from a list of halfedges. The list is assumed to be a proper sequence or loop. No checking is performed.

Parameters
halfedgesList of HE_Halfedge
looptrue/false, is the list supposed to be a loop?

References wblut.hemesh.HE_Path.createFromList().

Member Function Documentation

void wblut.hemesh.HE_Path.clear ( )
void wblut.hemesh.HE_Path.clearPathHalfedge ( )

Clear the HE_PathHalfedge.

void wblut.hemesh.HE_Path.clearPrecomputed ( )
void wblut.hemesh.HE_Path.createFromList ( final List< HE_Halfedge halfedges,
final boolean  loop 
)
private

Internally creates a looping path from a list of halfedges. The list is assumed to be a proper sequence or loop. No checking is performed.

Parameters
halfedgesList of HE_Halfedge
looptrue/false, is the list supposed to be a loop?

References wblut.hemesh.HE_Path._phalfedge, wblut.hemesh.HE_PathHalfedge.setNext(), and wblut.hemesh.HE_PathHalfedge.setPrev().

List<HE_Halfedge> wblut.hemesh.HE_Path.getHalfedges ( )
HE_PathHalfedge wblut.hemesh.HE_Path.getPathHalfedge ( )
Returns
get the starting HE_PathHalfedge

References wblut.hemesh.HE_Path._phalfedge.

double [] wblut.hemesh.HE_Path.getPathIncLengths ( )
int wblut.hemesh.HE_Path.getPathOrder ( )
Returns
number of halfedges in path. If the path is not a loop, care should be taken to include the end vertex of the last halfedge in the path.

References wblut.hemesh.HE_Path._phalfedge, and wblut.hemesh.HE_PathHalfedge.getNextInPath().

List<HE_Vertex> wblut.hemesh.HE_Path.getPathVertices ( )
boolean wblut.hemesh.HE_Path.isCut ( )

Does this path cut a mesh in two halves? Automatically true for a loop. An open path must have its start and end vertex on a boundary. Assumes that the path is constructed correctly. One of the "halves" can be degenerate, for example when looping around a single edge. NOTE: not sure if this is always correct for meshes with holes...

Returns
true/false

References wblut.hemesh.HE_Path._phalfedge, wblut.hemesh.HE_PathHalfedge.getEndVertex(), wblut.hemesh.HE_PathHalfedge.getNextInPath(), wblut.hemesh.HE_PathHalfedge.getVertex(), wblut.hemesh.HE_Vertex.isBoundary(), and wblut.hemesh.HE_Path.isLoop().

boolean wblut.hemesh.HE_Path.isLoop ( )

Is this path a loop? Only checks if first path halfedge has a valid getPrevInPath(). Assumes that the path is constructed correctly.

Returns
true/false

References wblut.hemesh.HE_PathHalfedge.getPrevInPath().

long wblut.hemesh.HE_Path.key ( )
Returns
unique key of HE_Path element
void wblut.hemesh.HE_Path.setPathHalfedge ( final HE_PathHalfedge  phalfedge)

Set the starting HE_PathHalfedge.

Parameters
phalfedge

Member Data Documentation

HE_PathHalfedge wblut.hemesh.HE_Path._phalfedge
protected

The HE_PathHalfedge that is the start of this path. If getPrevInPath() is null, the path is assumed to be open. If getPrevInPath() is not null, the path should be a single loop


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