HE_Mesh  5.0.0
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 ()
 
- 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 setLabel (final int label)
 
final long getKey ()
 
final int getInternalLabel ()
 
final int getLabel ()
 
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
 
long labels
 

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 ()
 
- 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;
wblut.hemesh.HE_Path.HE_Path ( final HE_Face  face)

Create a looping path from a single face .

Parameters
facesingle face
wblut.hemesh.HE_Path.HE_Path ( final HE_Vertex  v)

Create a looping path around a single vertex.

Parameters
vsingle vertex
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?

Member Function Documentation

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

Clear the HE_PathHalfedge.

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?
List<HE_Halfedge> wblut.hemesh.HE_Path.getHalfedges ( )
Returns
halfedges of path as List
List<HE_Halfedge> wblut.hemesh.HE_Path.getPathEdges ( )
Returns
the edges of the path
HE_PathHalfedge wblut.hemesh.HE_Path.getPathHalfedge ( )
Returns
get the starting HE_PathHalfedge
double [] wblut.hemesh.HE_Path.getPathIncLengths ( )
Returns
array containing incremental lengths, first element is always 0
List<HE_Face> wblut.hemesh.HE_Path.getPathInnerFaces ( )
Returns
get all faces belonging to the path halfedges
double wblut.hemesh.HE_Path.getPathLength ( )
Returns
total length of path
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.
List<HE_Face> wblut.hemesh.HE_Path.getPathOuterFaces ( )
Returns
get all faces belonging to the pairs of the path halfedges
List<HE_Vertex> wblut.hemesh.HE_Path.getPathVertices ( )
Returns
vertices of path as List. Includes end vertex of an open path.
static HE_Path wblut.hemesh.HE_Path.getShortestPath ( final HE_Vertex  v0,
final HE_Vertex  v1,
final HE_Mesh  mesh 
)
static
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
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
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
String wblut.hemesh.HE_Path.toString ( )

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: