VCG Library
0.1
|
Class containing functions to modify the topology of a halfedge based mesh. More...
#include <halfedge_topology.h>
Static Public Member Functions | |
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 Protected Member Functions | |
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) |
Class containing functions to modify the topology of a halfedge based mesh.
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face | ( | MeshType & | m, |
vector< VertexPointer > & | vps, | ||
GarbagePointer | gp = NULL |
||
) | [inline, static] |
Adds a face in a mesh, checking if the operation is possible.
m | Mesh |
vps | Vector of vertices (in ccw order) that will belong to the new face |
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face_unsafe | ( | MeshType & | m, |
vector< VertexPointer > & | vps, | ||
GarbagePointer | gp = NULL |
||
) | [inline, static, protected] |
Adds a face in a mesh without any check
m | Mesh |
vps | Vector of vertices (in ccw order) that will belong to the new face |
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face_unsafe | ( | MeshType & | m, |
vector< VertexPointer > & | vps, | ||
vector< HEdgePointer > & | hps, | ||
vector< bool > & | non_manifold_vertices, | ||
GarbagePointer | gp | ||
) | [inline, static, protected] |
Adds a face in a mesh without any check
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 |
static bool vcg::tri::HalfEdgeTopology< MeshType >::can_add_hedge | ( | vector< VertexPointer > & | vps, |
vector< HEdgePointer > & | hps | ||
) | [inline, static, protected] |
Checks if the next hedge can be inserted into hps. If true, inserts the hedge into hps. If false, inserts NULL.
vps | Vector of vertices (in ccw order) that will belong to the new face |
hps | Vector of hedges already checked |
true | if hedge can be inserted |
false | otherwise |
static bool vcg::tri::HalfEdgeTopology< MeshType >::can_remove_face | ( | FacePointer | fp | ) | [inline, static] |
Checks if a face can be removed
fp | Face to check |
true | if the face can be removed |
false | otherwise |
static void vcg::tri::HalfEdgeTopology< MeshType >::change_vertex | ( | VertexPointer | old_vp, |
VertexPointer | new_vp | ||
) | [inline, static, protected] |
Connects to a new vertex all hedges incident to a vertex
old_vp | the old vertex to be disconnected |
new_vp | the new vertex to be connected |
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::diagonal_collapse | ( | MeshType & | m, |
FacePointer | fp, | ||
VertexPointer | vp | ||
) | [inline, static] |
Collpases a diagonal in a quad.
m | Mesh |
fp | Face where diagonal resides |
vp | One of the two vertices of the diagonal |
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::doublet_remove | ( | MeshType & | m, |
VertexPointer | vp | ||
) | [inline, static] |
Removes a doublet merging the two quads in one
m | Mesh |
vp | Vertex shared by the two consecutive edges of the doublet |
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::edge_collapse | ( | MeshType & | m, |
EdgePointer | ep, | ||
VertexPointer | vp | ||
) | [inline, static] |
Collapses a generic edge
m | Mesh |
ep | Edge to be collapsed |
vp | Vertex to be deleted |
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::edge_collapse_quad | ( | MeshType & | m, |
EdgePointer | ep, | ||
VertexPointer | vp | ||
) | [inline, static] |
Collpases an edge shared by two quads, generating only quads. Made by a series of a vertex rotation and a diagonal collapse.
m | Mesh |
ep | Edge to be collapsed |
vp | Vertex that will be rotated |
static EdgePointer vcg::tri::HalfEdgeTopology< MeshType >::edge_rotate | ( | MeshType & | m, |
EdgePointer | ep, | ||
bool | cw | ||
) | [inline, static] |
Rotates a non-border edge shared by two quads
m | Mesh |
ep | Edge to be rotated |
cw | flag denoting a clockwise or counter-clockwise rotation |
static vector<FacePointer> vcg::tri::HalfEdgeTopology< MeshType >::get_incident_faces | ( | VertexPointer | vp, |
HEdgePointer | starting_he = NULL |
||
) | [inline, static] |
Gets all faces incident to a vertex
fp | Vertex |
starting_he | A hedge from which to start |
static vector<HEdgePointer> vcg::tri::HalfEdgeTopology< MeshType >::getHEdges | ( | FacePointer | fp, |
HEdgePointer | starting_he = NULL |
||
) | [inline, static, protected] |
Gets all edges incident to a face
fp | Face |
starting_he | A hedge in the face from which to start |
static vector<VertexPointer> vcg::tri::HalfEdgeTopology< MeshType >::getVertices | ( | FacePointer | fp, |
HEdgePointer | starting_he = NULL |
||
) | [inline, static] |
Gets all vertices incident to a face
fp | Face |
starting_he | A hedge in the face from which to start |
static bool vcg::tri::HalfEdgeTopology< MeshType >::remove_face | ( | MeshType & | m, |
FacePointer | fp, | ||
GarbagePointer | gp = NULL |
||
) | [inline, static] |
Removes a face in a mesh, checking if the operation is possible
m | Mesh |
fp | face to be removed |
true | if face has been removed |
false | otherwise |
static void vcg::tri::HalfEdgeTopology< MeshType >::remove_face_unsafe | ( | MeshType & | m, |
FacePointer | fp, | ||
GarbagePointer | gp = NULL |
||
) | [inline, static, protected] |
Removes a face in a mesh, without any check
m | Mesh |
fp | Face to be removed |
static EdgePointer vcg::tri::HalfEdgeTopology< MeshType >::singlet_remove | ( | MeshType & | m, |
FacePointer | fp | ||
) | [inline, static] |
Removes a singlet replacing it with an edge
m | Mesh |
vp | Vertex shared by the two consecutive edges inside the singlet |
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::vertex_rotate | ( | VertexPointer | vp | ) | [inline, static] |
Rotates a non-border vertex shared by only quads
m | Mesh |
vp | Vertex to be rotated |