HE::HalfEdge Class Reference

Class that represents the half-edges of the mesh. More...

#include <halfedge.h>

List of all members.

Public Member Functions

 HalfEdge (Vertex *v, Face *f, HalfEdge *t, HalfEdge *n)
 Constructor.
 HalfEdge (Vertex *v, Face *f)
 Constructor.
void next (HalfEdge *n)
 Sets the next HalfEdge in the Face.
void twin (HalfEdge *p)
 Sets the symmetric HalfEdge to this one.
void face (Face *f)
 Sets the associated Face object.
void dst (Vertex *v)
 Sets the destination Vertex object.
HalfEdgenext ()
 Returns the next HalfEdge in the Face.
const HalfEdgenext () const
 Returns the next HalfEdge in the Face. (Const method).
HalfEdgeprev ()
 Returns the previous HalfEdge in the Face.
const HalfEdgeprev () const
 Returns the previous HalfEdge in the Face. (Const method).
HalfEdgetwin ()
 Returns the twin (symmetric) HalfEdge.
const HalfEdgetwin () const
 Returns the twin (symmetric) HalfEdge. (Const method).
Faceface ()
 Returns the associated Face object.
const Faceface () const
 Returns the associated Face object. (Const method).
Vertexdst ()
 Returns the destination Vertex of the HalfEdge.
const Vertexdst () const
 Returns the destination Vertex of the HalfEdge. (Const method).
Vertexsrc ()
 Returns the source Vertex of the HalfEdge. (DANGEROUS if _twin is not set!).
const Vertexsrc () const
 Returns the source Vertex of the HalfEdge. (Const method) (DANGEROUS if _twin is not set!).
Geometry::Vector3Df normal () const
 Computes the normal of the HalfEdge (average of the two adjacent faces).
Geometry::Vector3Df tangent () const
 Returns the tangent direction of the HalfEdge.
Geometry::Vector3Df midpoint () const
 Returns the middle point of the HalfEdge.
float squaredLength () const
 Squared length of the HalfEdge.
float length () const
 Length of the segment.
bool isBoundary () const
 Tells if the half-edge is in a boundary of the mesh.

Protected Attributes

Vertex_dst
Face_face
HalfEdge_twin
HalfEdge_next


Detailed Description

Class that represents the half-edges of the mesh.

Each edge [a,b] of the mesh is represented by two HalfEdge objects, one from 'a' to 'b' and one the other way around. Each HalfEdge is also associated to the polygon (or hole) that is adjacent to that edge on a given side. By convention, the associated face for a HalfEdge is that which the HalfEdge traverses in countercloskwise order. For example, face [a,b,c] is associated to HalfEdge objects [a,b], [b,c] and [c,a]. The symmetric HalfEdge objects are associated to other faces.

The four differentiating pieces of data a HalfEdge contains are its twin() (or symmetric) HalfEdge, the next() HalfEdge in the associated Face, the face() itself to which the HalfEdge is associated, and the Vertex dst() where the HalfEdge ends.

Definition at line 42 of file halfedge.h.


The documentation for this class was generated from the following files:
Generated on Wed Apr 9 19:22:39 2008 for HalfEdge library by  doxygen 1.5.3