Class containing functions to modify the topology of a halfedge based mesh.
More...
#include <halfedge_topology.h>
|
|
typedef MeshType::VertexPointer | VertexPointer |
| |
|
typedef MeshType::EdgePointer | EdgePointer |
| |
|
typedef MeshType::HEdgePointer | HEdgePointer |
| |
|
typedef MeshType::FacePointer | FacePointer |
| |
|
typedef MeshType::VertexIterator | VertexIterator |
| |
|
typedef MeshType::EdgeIterator | EdgeIterator |
| |
|
typedef MeshType::HEdgeIterator | HEdgeIterator |
| |
|
typedef MeshType::FaceIterator | FaceIterator |
| |
|
| static VertexPointer | edge_collapse_quad (MeshType &m, HEdgePointer hp, VertexPointer vp) |
| |
| static VertexPointer | diagonal_collapse_quad (MeshType &m, FacePointer fp, VertexPointer vp) |
| |
| static FacePointer | doublet_remove_quad (MeshType &m, VertexPointer vp) |
| |
| static HEdgePointer | singlet_remove_quad (MeshType &m, FacePointer fp) |
| |
| static HEdgePointer | edge_rotate_quad (HEdgePointer hp, bool cw) |
| |
| static VertexPointer | vertex_rotate_quad (VertexPointer vp) |
| |
| static VertexPointer | edge_collapse (MeshType &m, HEdgePointer hp, VertexPointer vp) |
| |
| static FacePointer | add_face (MeshType &m, std::vector< VertexPointer > &vps) |
| |
| static bool | remove_face (MeshType &m, FacePointer fp) |
| |
| static bool | can_remove_face (FacePointer fp) |
| |
| static bool | check_diagonal_collapse_quad (HEdgePointer hp) |
| |
| static bool | is_nonManifold_vertex (MeshType &m, VertexPointer vp) |
| |
| static bool | is_nonManifold_vertex (VertexPointer vp) |
| |
| static VertexPointer | opp_vert (HEdgePointer hp) |
| |
| static std::vector< VertexPointer > | getVertices (VertexPointer vp) |
| |
| static std::set< FacePointer > | getFaces (VertexPointer vp) |
| |
| static bool | is_singlet_quad (FacePointer fp) |
| |
| static std::vector< VertexPointer > | getVertices (FacePointer fp, HEdgePointer starting_he=NULL) |
| |
| static std::vector< FacePointer > | get_incident_faces (VertexPointer vp, HEdgePointer starting_he=NULL) |
| |
|
static std::vector< FacePointer > | get_adjacent_faces (FacePointer fp) |
| |
| static std::vector< HEdgePointer > | get_incident_hedges (VertexPointer vp, HEdgePointer starting_he=NULL) |
| |
| static bool | has_doublet_quad (FacePointer fp) |
| |
| static std::vector< HEdgePointer > | find_doublet_hedges_quad (FacePointer fp) |
| |
| static bool | isBorderVertex (VertexPointer vp) |
| |
| static int | vertex_valence (VertexPointer vp) |
| |
|
| static FacePointer | add_face_unsafe (MeshType &m, std::vector< VertexPointer > &vps) |
| |
| static FacePointer | add_face_unsafe (MeshType &m, std::vector< VertexPointer > &vps, std::vector< HEdgePointer > &hps, std::vector< bool > &non_manifold_vertices) |
| |
| static void | remove_face_unsafe (MeshType &m, FacePointer fp) |
| |
| static bool | can_add_hedge (std::vector< VertexPointer > &vps, std::vector< HEdgePointer > &hps) |
| |
| static std::vector< HEdgePointer > | getHEdges (FacePointer fp, HEdgePointer starting_he=NULL) |
| |
| static void | change_vertex (VertexPointer old_vp, VertexPointer new_vp) |
| |
template<class MeshType>
class vcg::tri::HalfEdgeTopology< MeshType >
Class containing functions to modify the topology of a halfedge based mesh.
◆ add_face()
template<class MeshType >
Adds a face in a mesh, checking if the operation is possible.
- Parameters
-
| m | Mesh |
| vps | Vector of vertices (in ccw order) that will belong to the new face |
- Returns
- Pointer to the new face if it has been inserted, NULL otherwise
◆ add_face_unsafe() [1/2]
template<class MeshType >
Adds a face in a mesh without any check
- Parameters
-
| m | Mesh |
| vps | Vector of vertices (in ccw order) that will belong to the new face |
- Returns
- Pointer to the new face
◆ add_face_unsafe() [2/2]
template<class MeshType >
| static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face_unsafe |
( |
MeshType & |
m, |
|
|
std::vector< VertexPointer > & |
vps, |
|
|
std::vector< HEdgePointer > & |
hps, |
|
|
std::vector< bool > & |
non_manifold_vertices |
|
) |
| |
|
inlinestaticprotected |
Adds a face in a mesh without any check
- Parameters
-
| m | Mesh |
| vps | Vector of vertices (in ccw order) that will belong to the new face |
| hps | Vector of hedges (in ccw order) that will belong to the new face |
| non_manifold_vertices | Vector of booleans denoting on the i-th position if the i-th vertex is non-manifold |
- Returns
- Pointer to the new face
◆ can_add_hedge()
template<class MeshType >
| static bool vcg::tri::HalfEdgeTopology< MeshType >::can_add_hedge |
( |
std::vector< VertexPointer > & |
vps, |
|
|
std::vector< HEdgePointer > & |
hps |
|
) |
| |
|
inlinestaticprotected |
Checks if the next hedge can be inserted into hps. If true, inserts the hedge into hps. If false, inserts NULL.
- Parameters
-
| vps | Vector of vertices (in ccw order) that will belong to the new face |
| hps | Vector of hedges already checked |
- Return values
-
| true | if hedge can be inserted |
| false | otherwise |
◆ can_remove_face()
template<class MeshType >
Checks if a face can be removed
- Parameters
-
- Return values
-
| true | if the face can be removed |
| false | otherwise |
◆ change_vertex()
template<class MeshType >
Connects to a new vertex all hedges incident to a vertex
- Parameters
-
| old_vp | the old vertex to be disconnected |
| new_vp | the new vertex to be connected |
◆ check_diagonal_collapse_quad()
template<class MeshType >
Checks if a diagonal can be collapsed
- Parameters
-
| hp | Hedge whose vertex is one of the two vertices of the diagonal |
- Return values
-
| true | if diagonal can be collapsed |
| false | if diagonal cannot be collapsed |
◆ diagonal_collapse_quad()
template<class MeshType >
| static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::diagonal_collapse_quad |
( |
MeshType & |
m, |
|
|
FacePointer |
fp, |
|
|
VertexPointer |
vp |
|
) |
| |
|
inlinestatic |
Collpases a diagonal in a quad.
- Parameters
-
| m | Mesh |
| fp | Face where diagonal resides |
| vp | One of the two vertices of the diagonal |
- Returns
- Pointer to the new vertex
◆ doublet_remove_quad()
template<class MeshType >
Removes a doublet merging the two quads in one
- Parameters
-
| m | Mesh |
| vp | Vertex shared by the two consecutive edges of the doublet |
- Returns
- Pointer to the new face
◆ edge_collapse()
template<class MeshType >
Collapses a generic edge
- Parameters
-
| m | Mesh |
| hp | Edge to be collapsed |
| vp | Vertex to be deleted |
- Returns
- Pointer to the other vertex belonging to the collapsed edge
◆ edge_collapse_quad()
template<class MeshType >
| static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::edge_collapse_quad |
( |
MeshType & |
m, |
|
|
HEdgePointer |
hp, |
|
|
VertexPointer |
vp |
|
) |
| |
|
inlinestatic |
Collpases an edge shared by two quads, generating only quads. Made by a series of a vertex rotation and a diagonal collapse.
- Parameters
-
| m | Mesh |
| hp | hegde to be collapsed |
| vp | Vertex that will be rotated |
- Returns
- Pointer to the new vertex
◆ edge_rotate_quad()
template<class MeshType >
Rotates a non-border edge shared by two quads
- Parameters
-
| hp | Edge to be rotated |
| cw | flag denoting a clockwise or counter-clockwise rotation |
- Returns
- Pointer to the rotated edge
◆ find_doublet_hedges_quad()
template<class MeshType >
Gets all hedges whose vertex is into a doublet
- Parameters
-
- Returns
- Vector containing the hedges
◆ get_incident_faces()
template<class MeshType >
| static std::vector< FacePointer > vcg::tri::HalfEdgeTopology< MeshType >::get_incident_faces |
( |
VertexPointer |
vp, |
|
|
HEdgePointer |
starting_he = NULL |
|
) |
| |
|
inlinestatic |
Gets all faces incident to a vertex
- Parameters
-
| vp | Vertex |
| starting_he | A hedge from which to start |
- Returns
- Vector containing the incident faces
◆ get_incident_hedges()
template<class MeshType >
| static std::vector< HEdgePointer > vcg::tri::HalfEdgeTopology< MeshType >::get_incident_hedges |
( |
VertexPointer |
vp, |
|
|
HEdgePointer |
starting_he = NULL |
|
) |
| |
|
inlinestatic |
Gets all hedges incident to a vertex
- Parameters
-
| vp | Vertex |
| starting_he | A hedge from which to start navigation |
- Returns
- Vector containing the incident hedges
◆ getFaces()
template<class MeshType >
Gets faces on the 1-ring of a vertex
- Parameters
-
- Returns
- Set containing faces
◆ getHEdges()
template<class MeshType >
| static std::vector< HEdgePointer > vcg::tri::HalfEdgeTopology< MeshType >::getHEdges |
( |
FacePointer |
fp, |
|
|
HEdgePointer |
starting_he = NULL |
|
) |
| |
|
inlinestaticprotected |
Gets all hedges incident to a face
- Parameters
-
| fp | Face |
| starting_he | A hedge in the face from which to start |
- Returns
- Vector containing the incident hedges
◆ getVertices() [1/2]
template<class MeshType >
| static std::vector< VertexPointer > vcg::tri::HalfEdgeTopology< MeshType >::getVertices |
( |
FacePointer |
fp, |
|
|
HEdgePointer |
starting_he = NULL |
|
) |
| |
|
inlinestatic |
Gets all vertices incident to a face
- Parameters
-
| fp | Face |
| starting_he | A hedge in the face from which to start |
- Returns
- Vector containing the incident vertices
◆ getVertices() [2/2]
template<class MeshType >
Gets vertices on the 1-ring of a vertex
- Parameters
-
| vp | Vertex. It must be a non-border vertex. |
- Returns
- Vector containing vertices
◆ has_doublet_quad()
template<class MeshType >
Checks if a face has doublets
- Parameters
-
- Return values
-
| true | if face has at least a doublet |
| false | if face hasn't any doublet |
◆ is_nonManifold_vertex() [1/2]
template<class MeshType >
Checks if a vertex is non-manifold, comparing local and global information (slow)
- Parameters
-
- Return values
-
| true | if vertex is non-manifold |
| false | if verex is manifold |
◆ is_nonManifold_vertex() [2/2]
template<class MeshType >
Checks if a vertex is non-manifold, based only on local informations
- Parameters
-
- Return values
-
| true | if vertex is non-manifold |
| false | if verex is manifold |
◆ is_singlet_quad()
template<class MeshType >
Checks if a face is a singlet
- Parameters
-
- Return values
-
| true | if face is a singlet |
| false | if face isn't a singlet |
◆ isBorderVertex()
template<class MeshType >
Checks if a vertex is a border vertex
- Parameters
-
- Return values
-
| true | if vertex is a border vertex |
| false | if vertex isn't a border vertex |
◆ opp_vert()
template<class MeshType >
Shortcut to get the second vertex of an edge
- Parameters
-
- Returns
- Opposite vertex
◆ remove_face()
template<class MeshType >
Removes a face in a mesh, checking if the operation is possible
- Parameters
-
| m | Mesh |
| fp | face to be removed |
- Return values
-
| true | if face has been removed |
| false | otherwise |
◆ remove_face_unsafe()
template<class MeshType >
Removes a face in a mesh, without any check
- Parameters
-
| m | Mesh |
| fp | Face to be removed |
◆ singlet_remove_quad()
template<class MeshType >
Removes a singlet replacing it with an edge
- Parameters
-
| m | Mesh |
| fp | Face that should be a singlet quad |
- Returns
- Pointer to an halfdedge representing the new edge
◆ vertex_rotate_quad()
template<class MeshType >
Rotates a non-border vertex shared by only quads
- Parameters
-
- Returns
- Pointer to the rotated vertex
◆ vertex_valence()
template<class MeshType >
Computes valence of a vertex
- Parameters
-
- Returns
- Vertex valence
The documentation for this class was generated from the following file: