#include <halfedge.h>
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. | |
HalfEdge * | next () |
Returns the next HalfEdge in the Face. | |
const HalfEdge * | next () const |
Returns the next HalfEdge in the Face. (Const method). | |
HalfEdge * | prev () |
Returns the previous HalfEdge in the Face. | |
const HalfEdge * | prev () const |
Returns the previous HalfEdge in the Face. (Const method). | |
HalfEdge * | twin () |
Returns the twin (symmetric) HalfEdge. | |
const HalfEdge * | twin () const |
Returns the twin (symmetric) HalfEdge. (Const method). | |
Face * | face () |
Returns the associated Face object. | |
const Face * | face () const |
Returns the associated Face object. (Const method). | |
Vertex * | dst () |
Returns the destination Vertex of the HalfEdge. | |
const Vertex * | dst () const |
Returns the destination Vertex of the HalfEdge. (Const method). | |
Vertex * | src () |
Returns the source Vertex of the HalfEdge. (DANGEROUS if _twin is not set!). | |
const Vertex * | src () 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 |
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.