Class containing functions to modify the topology of a halfedge based mesh. More...
#include <halfedge_topology.h>
Class containing functions to modify the topology of a halfedge based mesh.
Definition at line 19 of file halfedge_topology.h.
typedef MeshType::EdgeIterator vcg::tri::HalfEdgeTopology< MeshType >::EdgeIterator |
Definition at line 29 of file halfedge_topology.h.
typedef MeshType::EdgePointer vcg::tri::HalfEdgeTopology< MeshType >::EdgePointer |
Definition at line 24 of file halfedge_topology.h.
typedef MeshType::FaceIterator vcg::tri::HalfEdgeTopology< MeshType >::FaceIterator |
Definition at line 31 of file halfedge_topology.h.
typedef MeshType::FacePointer vcg::tri::HalfEdgeTopology< MeshType >::FacePointer |
Definition at line 26 of file halfedge_topology.h.
typedef MeshType::HEdgeIterator vcg::tri::HalfEdgeTopology< MeshType >::HEdgeIterator |
Definition at line 30 of file halfedge_topology.h.
typedef MeshType::HEdgePointer vcg::tri::HalfEdgeTopology< MeshType >::HEdgePointer |
Definition at line 25 of file halfedge_topology.h.
typedef MeshType::VertexIterator vcg::tri::HalfEdgeTopology< MeshType >::VertexIterator |
Definition at line 28 of file halfedge_topology.h.
typedef MeshType::VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::VertexPointer |
Definition at line 23 of file halfedge_topology.h.
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face | ( | MeshType & | m, |
vector< VertexPointer > & | vps | ||
) | [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 |
Definition at line 619 of file halfedge_topology.h.
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face_unsafe | ( | MeshType & | m, |
vector< VertexPointer > & | vps | ||
) | [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 |
Definition at line 688 of file halfedge_topology.h.
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::add_face_unsafe | ( | MeshType & | m, |
vector< VertexPointer > & | vps, | ||
vector< HEdgePointer > & | hps, | ||
vector< bool > & | non_manifold_vertices | ||
) | [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 |
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 |
Definition at line 717 of file halfedge_topology.h.
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 |
Definition at line 1046 of file halfedge_topology.h.
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 |
Definition at line 1130 of file halfedge_topology.h.
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 |
Definition at line 1726 of file halfedge_topology.h.
static bool vcg::tri::HalfEdgeTopology< MeshType >::check_diagonal_collapse_quad | ( | HEdgePointer | hp | ) | [inline, static] |
Checks if a diagonal can be collapsed
hp | Hedge whose vertex is one of the two vertices of the diagonal |
true | if diagonal can be collapsed |
false | if diagonal cannot be collapsed |
Definition at line 1170 of file halfedge_topology.h.
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::diagonal_collapse_quad | ( | MeshType & | m, |
FacePointer | fp, | ||
VertexPointer | vp | ||
) | [inline, static] |
Collpases a diagonal in a quad.
Definition at line 81 of file halfedge_topology.h.
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::doublet_remove_quad | ( | MeshType & | m, |
VertexPointer | vp | ||
) | [inline, static] |
Removes a doublet merging the two quads in one
Definition at line 223 of file halfedge_topology.h.
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::edge_collapse | ( | MeshType & | m, |
HEdgePointer | hp, | ||
VertexPointer | vp | ||
) | [inline, static] |
Collapses a generic edge
Definition at line 551 of file halfedge_topology.h.
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::edge_collapse_quad | ( | MeshType & | m, |
HEdgePointer | hp, | ||
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.
Definition at line 44 of file halfedge_topology.h.
static HEdgePointer vcg::tri::HalfEdgeTopology< MeshType >::edge_rotate_quad | ( | HEdgePointer | hp, |
bool | cw | ||
) | [inline, static] |
Rotates a non-border edge shared by two quads
hp | Edge to be rotated |
cw | flag denoting a clockwise or counter-clockwise rotation |
Definition at line 391 of file halfedge_topology.h.
static vector<HEdgePointer> vcg::tri::HalfEdgeTopology< MeshType >::find_doublet_hedges_quad | ( | FacePointer | fp | ) | [inline, static] |
Gets all hedges whose vertex is into a doublet
fp | Face to check |
Definition at line 1628 of file halfedge_topology.h.
static vector<FacePointer> vcg::tri::HalfEdgeTopology< MeshType >::get_adjacent_faces | ( | FacePointer | fp | ) | [inline, static] |
Definition at line 1542 of file halfedge_topology.h.
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
vp | Vertex |
starting_he | A hedge from which to start |
Definition at line 1511 of file halfedge_topology.h.
static vector<HEdgePointer> vcg::tri::HalfEdgeTopology< MeshType >::get_incident_hedges | ( | VertexPointer | vp, |
HEdgePointer | starting_he = NULL |
||
) | [inline, static] |
Gets all hedges incident to a vertex
vp | Vertex |
starting_he | A hedge from which to start navigation |
Definition at line 1575 of file halfedge_topology.h.
static set<FacePointer> vcg::tri::HalfEdgeTopology< MeshType >::getFaces | ( | VertexPointer | vp | ) | [inline, static] |
Gets faces on the 1-ring of a vertex
vp | Vertex |
Definition at line 1373 of file halfedge_topology.h.
static vector<HEdgePointer> vcg::tri::HalfEdgeTopology< MeshType >::getHEdges | ( | FacePointer | fp, |
HEdgePointer | starting_he = NULL |
||
) | [inline, static, protected] |
Gets all hedges incident to a face
fp | Face |
starting_he | A hedge in the face from which to start |
Definition at line 1472 of file halfedge_topology.h.
static vector<VertexPointer> vcg::tri::HalfEdgeTopology< MeshType >::getVertices | ( | VertexPointer | vp | ) | [inline, static] |
Gets vertices on the 1-ring of a vertex
vp | Vertex. It must be a non-border vertex. |
Definition at line 1331 of file halfedge_topology.h.
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 |
Definition at line 1431 of file halfedge_topology.h.
static bool vcg::tri::HalfEdgeTopology< MeshType >::has_doublet_quad | ( | FacePointer | fp | ) | [inline, static] |
Checks if a face has doublets
fp | Face to check |
true | if face has at least a doublet |
false | if face hasn't any doublet |
Definition at line 1616 of file halfedge_topology.h.
static bool vcg::tri::HalfEdgeTopology< MeshType >::is_nonManifold_vertex | ( | MeshType & | m, |
VertexPointer | vp | ||
) | [inline, static] |
Checks if a vertex is non-manifold, comparing local and global information (slow)
true | if vertex is non-manifold |
false | if verex is manifold |
Definition at line 1254 of file halfedge_topology.h.
static bool vcg::tri::HalfEdgeTopology< MeshType >::is_nonManifold_vertex | ( | VertexPointer | vp | ) | [inline, static] |
Checks if a vertex is non-manifold, based only on local informations
vp | Vertex to check |
true | if vertex is non-manifold |
false | if verex is manifold |
Definition at line 1284 of file halfedge_topology.h.
static bool vcg::tri::HalfEdgeTopology< MeshType >::is_singlet_quad | ( | FacePointer | fp | ) | [inline, static] |
Checks if a face is a singlet
fp | Face to check |
true | if face is a singlet |
false | if face isn't a singlet |
Definition at line 1401 of file halfedge_topology.h.
static bool vcg::tri::HalfEdgeTopology< MeshType >::isBorderVertex | ( | VertexPointer | vp | ) | [inline, static] |
Checks if a vertex is a border vertex
vp | Vertex to check |
true | if vertex is a border vertex |
false | if vertex isn't a border vertex |
Definition at line 1663 of file halfedge_topology.h.
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::opp_vert | ( | HEdgePointer | hp | ) | [inline, static] |
Shortcut to get the second vertex of an edge
hp | Hedge |
Definition at line 1319 of file halfedge_topology.h.
static bool vcg::tri::HalfEdgeTopology< MeshType >::remove_face | ( | MeshType & | m, |
FacePointer | fp | ||
) | [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 |
Definition at line 659 of file halfedge_topology.h.
static void vcg::tri::HalfEdgeTopology< MeshType >::remove_face_unsafe | ( | MeshType & | m, |
FacePointer | fp | ||
) | [inline, static, protected] |
Removes a face in a mesh, without any check
Definition at line 943 of file halfedge_topology.h.
static HEdgePointer vcg::tri::HalfEdgeTopology< MeshType >::singlet_remove_quad | ( | MeshType & | m, |
FacePointer | fp | ||
) | [inline, static] |
Removes a singlet replacing it with an edge
Definition at line 296 of file halfedge_topology.h.
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::vertex_rotate_quad | ( | VertexPointer | vp | ) | [inline, static] |
Rotates a non-border vertex shared by only quads
vp | Vertex to be rotated |
Definition at line 485 of file halfedge_topology.h.
static int vcg::tri::HalfEdgeTopology< MeshType >::vertex_valence | ( | VertexPointer | vp | ) | [inline, static] |
Computes valence of a vertex
vp | Vertex |
Definition at line 1693 of file halfedge_topology.h.