HE_Mesh2014  2.0.11
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
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 setData (final String s, final Object o)
 
Object getData (final String s)
 
void clear ()
 
boolean isLoop ()
 
boolean isCut ()
 
- Public Member Functions inherited from wblut.hemesh.HE_Element
 HE_Element ()
 
final void setInternalLabel (final int label)
 
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)
 
abstract void clear ()
 
- Public Member Functions inherited from wblut.geom.WB_HasData
Object getData (String s)
 
void setData (String s, Object o)
 

Protected Attributes

HE_PathHalfedge _phalfedge
 
- Protected Attributes inherited from wblut.hemesh.HE_Element
final long _key
 

Private Member Functions

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

Private Attributes

HashMap< String, Object > _data
 

Additional Inherited Members

- Static Protected Attributes inherited from wblut.hemesh.HE_Element
static long _currentKey
 
static final WB_GeometryFactory geometryfactory
 

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 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?

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?
Object wblut.hemesh.HE_Path.getData ( final String  s)
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.
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.setData ( final String  s,
final Object  o 
)
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

HashMap<String, Object> wblut.hemesh.HE_Path._data
private
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: