G+Smo
25.01.0
Geometry + Simulation Modules
|
Class that maintains directed halfedges in any dimension.
Inner classes. Needs to be defined in sequence Halfedge, Chain, Boundary
The class Halfedge represents a halfedge in any dimension given by its origin and end point indices and its length. A halfedge can be constructed with desired origin and end point and length. Two halfedges can be compared by == and !=. There are getter function for origin, end and length. There are functions to test wheter a halfedge can be appended to another one before or afterwards and whether a halfedge is a twin of another.
Halfedges can be outputted like (origin–end: length).
Public Member Functions | |
size_t | getEnd () const |
Get end vertex index. | |
T | getLength () const |
Get length of halfedge. | |
size_t | getOrigin () const |
Get origin vertex index. | |
Halfedge (const size_t origin=0, const size_t end=0, const T length=0) | |
This constructor sets the origin- and * end-point indices as well as length to preferred values. | |
bool | isNext (const Halfedge &previousHalfedge) const |
Tells if halfedge can be added at beginning. | |
bool | isPrev (const Halfedge &nextHalfedge) const |
Tells if halfedge can be added at end. | |
bool | isTwin (const Halfedge &halfedge) const |
Tells if halfedge is twin. | |
Private Attributes | |
size_t | m_end |
index of end vertex | |
T | m_length |
length of halfedge | |
size_t | m_origin |
index of origin vertex | |
|
inlineexplicit |
This constructor sets the origin- and * end-point indices as well as length to preferred values.
[in] | origin | index of origin vertex |
[in] | end | index of end vertex |
[in] | length | length of the halfedge |
|
inline |
Get end vertex index.
|
inline |
Get length of halfedge.
|
inline |
Get origin vertex index.
|
inline |
Tells if halfedge can be added at beginning.
[in] | previousHalfedge | halfedge which we want to know about if can be added at beginning |
|
inline |
Tells if halfedge can be added at end.
[in] | nextHalfedge | halfedge which we want to know about if can be added at end |
|
inline |
Tells if halfedge is twin.
[in] | halfedge | halfedge which we want to know about if it is a twin |