Exposes a half-edge like API for traversing a Mesh.
More...
#include <geogram/mesh/mesh_halfedges.h>
|
struct | Halfedge |
| Stores a reference to a mesh corner and facet, and provides a halfedge-like API. More...
|
|
Exposes a half-edge like API for traversing a Mesh.
Definition at line 59 of file mesh_halfedges.h.
◆ MeshHalfedges()
GEO::MeshHalfedges::MeshHalfedges |
( |
Mesh & |
mesh | ) |
|
|
inline |
◆ halfedge_is_border()
bool GEO::MeshHalfedges::halfedge_is_border |
( |
const Halfedge & |
H | ) |
const |
|
inline |
Tests whether a Halfedge is on the boder.
If set_use_facet_region() is set, then Halfedges incident to two different facet regions are considered as borders.
- Parameters
-
- Returns
- true if
H
is on the border, false otherwise
Definition at line 220 of file mesh_halfedges.h.
◆ halfedge_is_valid()
bool GEO::MeshHalfedges::halfedge_is_valid |
( |
const Halfedge & |
H | ) |
const |
|
inline |
Tests whether a Halfedge is valid.
- Parameters
-
- Returns
- true if
H
refers to a halfedge that exists in the mesh, false otherwise
- Note
- It only tests whether H.corner and H.facet are valid indices in the mesh, but does not test whether H.corner exists in H.facet.
Definition at line 203 of file mesh_halfedges.h.
◆ mesh() [1/2]
Mesh& GEO::MeshHalfedges::mesh |
( |
| ) |
|
|
inline |
Gets the mesh.
- Returns
- a reference to the mesh.
Definition at line 140 of file mesh_halfedges.h.
◆ mesh() [2/2]
const Mesh& GEO::MeshHalfedges::mesh |
( |
| ) |
const |
|
inline |
Gets the mesh.
- Returns
- a const reference to the mesh.
Definition at line 148 of file mesh_halfedges.h.
◆ move_to_next_around_border()
void GEO::MeshHalfedges::move_to_next_around_border |
( |
Halfedge & |
H | ) |
const |
Replaces a Halfedge with the next one around the border.
If set_use_facet_region() is set, then Halfedges incident to two different facet regions are considered as borders.
- Parameters
-
◆ move_to_next_around_facet()
void GEO::MeshHalfedges::move_to_next_around_facet |
( |
Halfedge & |
H | ) |
const |
|
inline |
◆ move_to_next_around_vertex()
bool GEO::MeshHalfedges::move_to_next_around_vertex |
( |
Halfedge & |
H | ) |
const |
Replaces a Halfedge with the next one around the vertex.
- Parameters
-
- Returns
- true if the move was successful, false otherwise. On borders, the next halfedge around a vertex may not exist.
◆ move_to_opposite()
void GEO::MeshHalfedges::move_to_opposite |
( |
Halfedge & |
H | ) |
const |
Replaces a Halfedge with the opposite one in the adjacent facet.
- Parameters
-
- Precondition
- !is_on_border(H)
◆ move_to_prev_around_border()
void GEO::MeshHalfedges::move_to_prev_around_border |
( |
Halfedge & |
H | ) |
const |
Replaces a Halfedge with the previous one around the border.
If set_use_facet_region() is set, then Halfedges incident to two different facet regions are considered as borders.
- Parameters
-
◆ move_to_prev_around_facet()
void GEO::MeshHalfedges::move_to_prev_around_facet |
( |
Halfedge & |
H | ) |
const |
|
inline |
◆ move_to_prev_around_vertex()
bool GEO::MeshHalfedges::move_to_prev_around_vertex |
( |
Halfedge & |
H | ) |
const |
Replaces a Halfedge with the previous one around the vertex.
- Parameters
-
- Returns
- true if the move was successful, false otherwise. On borders, the previous halfedge around a vertex may not exist.
◆ set_use_facet_region() [1/3]
void GEO::MeshHalfedges::set_use_facet_region |
( |
bool |
x | ) |
|
|
inline |
Sets whether facet regions determine borders.
- Parameters
-
[in] | x | if set, then an halfedge incident to two facets with different facet regions is considered to be a border |
Definition at line 158 of file mesh_halfedges.h.
◆ set_use_facet_region() [2/3]
void GEO::MeshHalfedges::set_use_facet_region |
( |
const char * |
attribute_name | ) |
|
|
inline |
Sets a facet attribute name that determines borders.
- Parameters
-
[in] | attribute_name | the name of the facet attribute to be used to determine borders. |
Needed to have this overload, because const char* is implicitly converted to bool instead of std::string.
Definition at line 189 of file mesh_halfedges.h.
◆ set_use_facet_region() [3/3]
void GEO::MeshHalfedges::set_use_facet_region |
( |
const std::string & |
attribute_name | ) |
|
|
inline |
Sets a facet attribute name that determines borders.
- Parameters
-
[in] | attribute_name | the name of the facet attribute to be used to determine borders. |
Definition at line 175 of file mesh_halfedges.h.
The documentation for this class was generated from the following file: