Class containing functions to modify the topology of a halfedge based mesh.
More...
#include <halfedge_topology.h>
|
static VertexPointer | edge_collapse_quad (MeshType &m, EdgePointer ep, VertexPointer vp) |
|
static VertexPointer | diagonal_collapse (MeshType &m, FacePointer fp, VertexPointer vp) |
|
static FacePointer | doublet_remove (MeshType &m, VertexPointer vp) |
|
static EdgePointer | singlet_remove (MeshType &m, FacePointer fp) |
|
static EdgePointer | edge_rotate (MeshType &m, EdgePointer ep, bool cw) |
|
static VertexPointer | vertex_rotate (VertexPointer vp) |
|
static VertexPointer | edge_collapse (MeshType &m, EdgePointer ep, VertexPointer vp) |
|
static FacePointer | add_face (MeshType &m, vector< VertexPointer > &vps, GarbagePointer gp=NULL) |
|
static bool | remove_face (MeshType &m, FacePointer fp, GarbagePointer gp=NULL) |
|
static bool | can_remove_face (FacePointer fp) |
|
static vector< VertexPointer > | getVertices (FacePointer fp, HEdgePointer starting_he=NULL) |
|
static vector< FacePointer > | get_incident_faces (VertexPointer vp, HEdgePointer starting_he=NULL) |
|
|
static FacePointer | add_face_unsafe (MeshType &m, vector< VertexPointer > &vps, GarbagePointer gp=NULL) |
|
static FacePointer | add_face_unsafe (MeshType &m, vector< VertexPointer > &vps, vector< HEdgePointer > &hps, vector< bool > &non_manifold_vertices, GarbagePointer gp) |
|
static void | remove_face_unsafe (MeshType &m, FacePointer fp, GarbagePointer gp=NULL) |
|
static bool | can_add_hedge (vector< VertexPointer > &vps, vector< HEdgePointer > &hps) |
|
static 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 >
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face |
( |
MeshType & | m, |
|
|
vector< VertexPointer > & | vps, |
|
|
GarbagePointer | gp = NULL ) |
|
inlinestatic |
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 >
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face_unsafe |
( |
MeshType & | m, |
|
|
vector< VertexPointer > & | vps, |
|
|
GarbagePointer | gp = NULL ) |
|
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 |
- 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, |
|
|
vector< VertexPointer > & | vps, |
|
|
vector< HEdgePointer > & | hps, |
|
|
vector< bool > & | non_manifold_vertices, |
|
|
GarbagePointer | gp ) |
|
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 |
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 >
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 |
◆ diagonal_collapse()
template<class MeshType >
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()
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 |
ep | 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, |
|
|
EdgePointer | ep, |
|
|
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 |
ep | Edge to be collapsed |
vp | Vertex that will be rotated |
- Returns
- Pointer to the new vertex
◆ edge_rotate()
template<class MeshType >
Rotates a non-border edge shared by two quads
- Parameters
-
m | Mesh |
ep | Edge to be rotated |
cw | flag denoting a clockwise or counter-clockwise rotation |
- Returns
- Pointer to the rotated edge
◆ get_incident_faces()
template<class MeshType >
static vector< FacePointer > vcg::tri::HalfEdgeTopology< MeshType >::get_incident_faces |
( |
VertexPointer | vp, |
|
|
HEdgePointer | starting_he = NULL ) |
|
inlinestatic |
Gets all faces incident to a vertex
- Parameters
-
fp | Vertex |
starting_he | A hedge from which to start |
- Returns
- Vector containing the incident faces
◆ getHEdges()
template<class MeshType >
static vector< HEdgePointer > vcg::tri::HalfEdgeTopology< MeshType >::getHEdges |
( |
FacePointer | fp, |
|
|
HEdgePointer | starting_he = NULL ) |
|
inlinestaticprotected |
Gets all edges incident to a face
- Parameters
-
fp | Face |
starting_he | A hedge in the face from which to start |
- Returns
- Vector containing the incident edges
◆ getVertices()
template<class MeshType >
static 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
◆ 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()
template<class MeshType >
Removes a singlet replacing it with an edge
- Parameters
-
m | Mesh |
vp | Vertex shared by the two consecutive edges inside the singlet |
- Returns
- Pointer to the new edge
◆ vertex_rotate()
template<class MeshType >
Rotates a non-border vertex shared by only quads
- Parameters
-
m | Mesh |
vp | Vertex to be rotated |
- Returns
- Pointer to the rotated vertex
The documentation for this class was generated from the following file: