The Parametric Pseudo-Manifold (PPS) Library 1.0
|
This class represents a half-edge (i.e., an oriented line segment) from a triangle surface mesh represented by the DCEL data structure. More...
#include <halfedge.h>
Public Types | |
typedef dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib > | Vertex |
Defines Vertex as an alias for dcel::Vertex< VAttrib, FAttrib , EAttrib , HAttrib >. | |
typedef dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib > | Edge |
Defines Edge as an alias for dcel::Edge< VAttrib, FAttrib , EAttrib , HAttrib >. | |
typedef dcel::Face< VAttrib, FAttrib, EAttrib, HAttrib > | Face |
Defines Face as an alias for dcel::Face< VAttrib, FAttrib , EAttrib , HAttrib >. | |
Public Member Functions | |
Halfedge (Vertex *vertex, Edge *edge, Face *face, Halfedge *next, Halfedge *prev) | |
Creates an instance of this class. | |
~Halfedge () | |
Destroys an instance of this class. | |
Vertex * | get_origin () const |
Returns a pointer to the origin vertex of this half-edge. | |
void | set_origin (Vertex *vertex) |
Assigns an address to the pointer to the origin vertex of this half-edge. | |
Edge * | get_edge () const |
Returns a pointer to the edge this half-edge belongs to. | |
void | set_edge (Edge *edge) |
Assigns an address to the pointer to the edge this half-edge belongs to. | |
Face * | get_face () const |
Returns a pointer to the face whose half-edge cycle this half-edge belongs to. | |
void | set_face (Face *face) |
Assigns an address to the pointer to the face whose half-edge cycle this half-edge belongs to. | |
Halfedge * | get_next () const |
Returns a pointer to the next half-edge in the half-edge cycle this half-edge belongs to. | |
void | set_next (Halfedge *next) |
Assigns an address to the pointer to the next half-edge in the face half-edge cycle this half-edge belongs to. | |
Halfedge * | get_prev () const |
Returns a pointer to the previous half-edge in the half-edge cycle this half-edge belongs to. | |
void | set_prev (Halfedge *prev) |
Assigns an address to the pointer to the previous half-edge in the face half-edge cycle this half-edge belongs to. | |
Halfedge * | get_mate () const |
Returns a pointer to the mate of this half-edge (if any). | |
HAttrib & | get_attributes () |
Returns the set of attributes associated with this halfedge. | |
Private Attributes | |
Vertex * | _vertex |
Pointer to the origin vertex of this half-edge. | |
Edge * | _edge |
Pointer to the edge this half-edge belongs to. | |
Face * | _face |
Pointer to the face whose half-edge cycle this half-edge belongs to. | |
Halfedge * | _next |
Pointer to the next half-edge in the cycle this half-edge belongs to. | |
Halfedge * | _prev |
Pointer to the previous half-edge in the cycle this half-edge belongs to. | |
HAttrib | _attributes |
Set of attributes associated with this halfedge. |
This class represents a half-edge (i.e., an oriented line segment) from a triangle surface mesh represented by the DCEL data structure.
Definition at line 75 of file halfedge.h.
dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge | ( | Vertex * | vertex, |
Edge * | edge, | ||
Face * | face, | ||
Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > * | next, | ||
Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > * | prev | ||
) | [inline] |
Creates an instance of this class.
vertex | A pointer to the origin vertex of this halfedge. |
edge | A pointer to the edge this halfedge belongs to. |
face | A pointer to the face whose half-edge cycle this halfedge belongs to. |
next | A pointer to the next halfedge in the half-edge cycle containing this halfedge. |
prev | A pointer to the previous halfedge in the half-edge cycle containing this halfedge. |
Definition at line 128 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_edge(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_face(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_next(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_origin(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_prev().
{ set_origin( vertex ) ; set_edge( edge ) ; set_face( face ) ; set_next( next ) ; set_prev( prev ) ; }
HAttrib & dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_attributes | ( | ) | [inline] |
Returns the set of attributes associated with this halfedge.
Definition at line 331 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_attributes.
{ return _attributes ; }
Edge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_edge | ( | ) | const [inline] |
Returns a pointer to the edge this half-edge belongs to.
Definition at line 195 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_edge.
Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_mate(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().
{ return _edge ; }
Face * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_face | ( | ) | const [inline] |
Returns a pointer to the face whose half-edge cycle this half-edge belongs to.
Definition at line 224 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_face.
Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().
{ return _face ; }
Halfedge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_mate | ( | ) | const [inline] |
Returns a pointer to the mate of this half-edge (if any).
Definition at line 314 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_edge(), dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::get_first_halfedge(), and dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::get_second_halfedge().
Referenced by ppsfrompnt::HalfedgeAttribute::compute_origin_vertex_degree(), ppsfrompnt::HalfedgeAttribute::compute_pps_id(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().
{ if ( get_edge()->get_first_halfedge() == this ) { return get_edge()->get_second_halfedge() ; } return get_edge()->get_first_halfedge() ; }
Halfedge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_next | ( | ) | const [inline] |
Returns a pointer to the next half-edge in the half-edge cycle this half-edge belongs to.
Definition at line 254 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_next.
Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().
{ return _next ; }
Vertex * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_origin | ( | ) | const [inline] |
Returns a pointer to the origin vertex of this half-edge.
Definition at line 167 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_vertex.
Referenced by ppsfrompnt::HalfedgeAttribute::compute_pps_id(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().
{ return _vertex ; }
Halfedge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_prev | ( | ) | const [inline] |
Returns a pointer to the previous half-edge in the half-edge cycle this half-edge belongs to.
Definition at line 284 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_prev.
Referenced by ppsfrompnt::HalfedgeAttribute::compute_origin_vertex_degree(), ppsfrompnt::HalfedgeAttribute::compute_pps_id(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().
{ return _prev ; }
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_edge | ( | Edge * | edge | ) | [inline] |
Assigns an address to the pointer to the edge this half-edge belongs to.
edge | The address of the edge this half-edge belongs to. |
Definition at line 209 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_edge.
Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().
{ _edge = edge ; }
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_face | ( | Face * | face | ) | [inline] |
Assigns an address to the pointer to the face whose half-edge cycle this half-edge belongs to.
face | The address of the face whose half-edge cycle this half-edge belongs to. |
Definition at line 239 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_face.
Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().
{ _face = face ; }
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_next | ( | Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > * | next | ) | [inline] |
Assigns an address to the pointer to the next half-edge in the face half-edge cycle this half-edge belongs to.
next | The address of the next half-edge in the face half-edge cycle this half-edge belongs to. |
Definition at line 269 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_next.
Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::create_faces(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().
{ _next = next ; }
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_origin | ( | Vertex * | vertex | ) | [inline] |
Assigns an address to the pointer to the origin vertex of this half-edge.
vertex | The address of the origin vertex of this half-edge. |
Definition at line 182 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_vertex.
Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().
{ _vertex = vertex ; }
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_prev | ( | Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > * | prev | ) | [inline] |
Assigns an address to the pointer to the previous half-edge in the face half-edge cycle this half-edge belongs to.
prev | The address of the previous half-edge in the face half-edge cycle this half-edge belongs to. |
Definition at line 300 of file halfedge.h.
References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_prev.
Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::create_faces(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().
{ _prev = prev ; }