The Parametric Pseudo-Manifold (PPS) Library 1.0
|
This class represents an edge (i.e., a line segment) from a triangle surface mesh represented by the DCEL data structure. More...
#include <edge.h>
Public Types | |
typedef dcel::Halfedge < VAttrib, FAttrib, EAttrib, HAttrib > | Halfedge |
Defines Halfedge as an alias for dcel::Halfedge< VAttrib, FAttrib , EAttrib , HAttrib >. | |
Public Member Functions | |
Edge (Halfedge *h1, Halfedge *h2) | |
Creates an instance of this class. | |
~Edge () | |
Destroys an instance of this class. | |
Halfedge * | get_first_halfedge () const |
Returns a pointer to the first half-edge of this edge. | |
Halfedge * | get_second_halfedge () const |
Returns a pointer to the second half-edge of this edge. | |
bool | is_boundary_edge () const |
Returns the logic value true if this edge belongs to the boundary of the surface and the logic value false otherwise. | |
void | set_first_halfedge (Halfedge *h) |
Assigns a given address to the pointer to the first half-edge of this edge. | |
void | set_second_halfedge (Halfedge *h) |
Assigns a given address to the pointer to the second half-edge of this edge. | |
EAttrib & | get_attributes () |
Returns the set of attributes associated with this edge. | |
Private Attributes | |
Halfedge * | _h1 |
Pointer to the first half-edge of this edge. | |
Halfedge * | _h2 |
Pointer to the second half-edge of this edge. | |
EAttrib | _attributes |
Set of attributes associated with this edge. |
This class represents an edge (i.e., a line segment) from a triangle surface mesh represented by the DCEL data structure.
dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::Edge | ( | Halfedge * | h1, |
Halfedge * | h2 | ||
) | [inline] |
Creates an instance of this class.
h1 | A pointer to one half-edge of this edge. |
h2 | A pointer to the other half-edge of this edge. |
Definition at line 104 of file edge.h.
References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_first_halfedge(), and dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_second_halfedge().
{ set_first_halfedge( h1 ) ; set_second_halfedge( h2 ) ; }
EAttrib & dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::get_attributes | ( | ) | [inline] |
Returns the set of attributes associated with this edge.
Definition at line 203 of file edge.h.
References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_attributes.
{ return _attributes ; }
Halfedge * dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::get_first_halfedge | ( | ) | const [inline] |
Returns a pointer to the first half-edge of this edge.
Definition at line 133 of file edge.h.
References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h1.
Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_mate(), dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::~Surface().
{ return _h1 ; }
Halfedge * dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::get_second_halfedge | ( | ) | const [inline] |
Returns a pointer to the second half-edge of this edge.
Definition at line 146 of file edge.h.
References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h2.
Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_mate(), dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::~Surface().
{ return _h2 ; }
bool dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::is_boundary_edge | ( | ) | const [inline] |
Returns the logic value true if this edge belongs to the boundary of the surface and the logic value false otherwise.
Definition at line 161 of file edge.h.
References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h1, and dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h2.
void dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_first_halfedge | ( | Halfedge * | h | ) | [inline] |
Assigns a given address to the pointer to the first half-edge of this edge.
h | The address of the first half-edge of this edge. |
Definition at line 175 of file edge.h.
References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h1.
Referenced by dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::Edge(), and dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::~Edge().
{ _h1 = h ; }
void dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_second_halfedge | ( | Halfedge * | h | ) | [inline] |
Assigns a given address to the pointer to the second half-edge of this edge.
h | The address of the second half-edge of this edge. |
Definition at line 189 of file edge.h.
References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h2.
Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::create_edges(), dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::Edge(), and dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::~Edge().
{ _h2 = h ; }