vcg::tri::HalfEdgeTopology< MeshType > Class Template Reference

Class containing functions to modify the topology of a halfedge based mesh. More...

#include <halfedge_topology.h>

List of all members.

Public Types

typedef MeshType::EdgeIterator EdgeIterator
typedef MeshType::EdgePointer EdgePointer
typedef MeshType::FaceIterator FaceIterator
typedef MeshType::FacePointer FacePointer
typedef MeshType::HEdgeIterator HEdgeIterator
typedef MeshType::HEdgePointer HEdgePointer
typedef MeshType::VertexIterator VertexIterator
typedef MeshType::VertexPointer VertexPointer

Static Public Member Functions

static FacePointer add_face (MeshType &m, vector< VertexPointer > &vps)
static VertexPointer diagonal_collapse (MeshType &m, FacePointer fp, VertexPointer vp)
static FacePointer doublet_remove (MeshType &m, VertexPointer vp)
static VertexPointer edge_collapse (MeshType &m, EdgePointer ep, VertexPointer vp)
static VertexPointer edge_collapse_quad (MeshType &m, EdgePointer ep, VertexPointer vp)
static EdgePointer edge_rotate (MeshType &m, EdgePointer ep, bool cw)
static bool remove_face (MeshType &m, FacePointer fp)
static EdgePointer singlet_remove (MeshType &m, VertexPointer vp)
static VertexPointer vertex_rotate (MeshType &m, VertexPointer vp)

Static Protected Member Functions

static FacePointer add_face_unsafe (MeshType &m, vector< VertexPointer > &vps, vector< HEdgePointer > &hps, vector< bool > &non_manifold_vertices)
static FacePointer add_face_unsafe (MeshType &m, vector< VertexPointer > &vps)
static bool can_add_hedge (vector< VertexPointer > &vps, vector< HEdgePointer > &hps)
static bool can_remove_face (FacePointer fp)
static void change_vertex (VertexPointer old_vp, VertexPointer new_vp)
static vector< FacePointerget_incident_faces (VertexPointer vp, HEdgePointer starting_he=NULL)
static vector< HEdgePointergetHEdges (FacePointer fp, HEdgePointer starting_he=NULL)
static vector< VertexPointergetVertices (FacePointer fp, HEdgePointer starting_he=NULL)
static void remove_face_unsafe (MeshType &m, FacePointer fp)

Detailed Description

template<class MeshType>
class vcg::tri::HalfEdgeTopology< MeshType >

Class containing functions to modify the topology of a halfedge based mesh.

Definition at line 22 of file halfedge_topology.h.


Member Typedef Documentation

template<class MeshType >
typedef MeshType::EdgeIterator vcg::tri::HalfEdgeTopology< MeshType >::EdgeIterator

Definition at line 32 of file halfedge_topology.h.

template<class MeshType >
typedef MeshType::EdgePointer vcg::tri::HalfEdgeTopology< MeshType >::EdgePointer

Definition at line 27 of file halfedge_topology.h.

template<class MeshType >
typedef MeshType::FaceIterator vcg::tri::HalfEdgeTopology< MeshType >::FaceIterator

Definition at line 34 of file halfedge_topology.h.

template<class MeshType >
typedef MeshType::FacePointer vcg::tri::HalfEdgeTopology< MeshType >::FacePointer

Definition at line 29 of file halfedge_topology.h.

template<class MeshType >
typedef MeshType::HEdgeIterator vcg::tri::HalfEdgeTopology< MeshType >::HEdgeIterator

Definition at line 33 of file halfedge_topology.h.

template<class MeshType >
typedef MeshType::HEdgePointer vcg::tri::HalfEdgeTopology< MeshType >::HEdgePointer

Definition at line 28 of file halfedge_topology.h.

template<class MeshType >
typedef MeshType::VertexIterator vcg::tri::HalfEdgeTopology< MeshType >::VertexIterator

Definition at line 31 of file halfedge_topology.h.

template<class MeshType >
typedef MeshType::VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::VertexPointer

Definition at line 26 of file halfedge_topology.h.


Member Function Documentation

template<class MeshType >
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.

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

Definition at line 638 of file halfedge_topology.h.

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 
) [inline, static, protected]

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

Definition at line 737 of file halfedge_topology.h.

template<class MeshType >
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

Parameters:
m Mesh
vps Vector of vertices (in ccw order) that will belong to the new face
Returns:
Pointer to the new face

Definition at line 710 of file halfedge_topology.h.

template<class MeshType >
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.

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

Definition at line 1056 of file halfedge_topology.h.

template<class MeshType >
static bool vcg::tri::HalfEdgeTopology< MeshType >::can_remove_face ( FacePointer  fp  )  [inline, static, protected]

Checks if a face can be removed

Parameters:
fp Face to check
Return values:
true if the face can be removed
false otherwise

Definition at line 1139 of file halfedge_topology.h.

template<class MeshType >
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

Parameters:
old_vp the old vertex to be disconnected
new_vp the new vertex to be connected

Definition at line 1277 of file halfedge_topology.h.

template<class MeshType >
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::diagonal_collapse ( MeshType &  m,
FacePointer  fp,
VertexPointer  vp 
) [inline, static]

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

Definition at line 91 of file halfedge_topology.h.

template<class MeshType >
static FacePointer vcg::tri::HalfEdgeTopology< MeshType >::doublet_remove ( MeshType &  m,
VertexPointer  vp 
) [inline, static]

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

Definition at line 307 of file halfedge_topology.h.

template<class MeshType >
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::edge_collapse ( MeshType &  m,
EdgePointer  ep,
VertexPointer  vp 
) [inline, static]

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

Definition at line 569 of file halfedge_topology.h.

template<class MeshType >
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.

Parameters:
m Mesh
ep Edge to be collapsed
vp Vertex that will be rotated
Returns:
Pointer to the new vertex

Definition at line 46 of file halfedge_topology.h.

template<class MeshType >
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

Parameters:
m Mesh
ep Edge to be rotated
cw flag denoting a clockwise or counter-clockwise rotation
Returns:
Pointer to the rotated edge

Definition at line 426 of file halfedge_topology.h.

template<class MeshType >
static vector<FacePointer> vcg::tri::HalfEdgeTopology< MeshType >::get_incident_faces ( VertexPointer  vp,
HEdgePointer  starting_he = NULL 
) [inline, static, protected]

Gets all faces incident to a vertex

Parameters:
fp Vertex
starting_he A hedge from which to start
Returns:
Vector containing the incident faces

Definition at line 1244 of file halfedge_topology.h.

template<class MeshType >
static vector<HEdgePointer> vcg::tri::HalfEdgeTopology< MeshType >::getHEdges ( FacePointer  fp,
HEdgePointer  starting_he = NULL 
) [inline, static, protected]

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

Definition at line 1210 of file halfedge_topology.h.

template<class MeshType >
static vector<VertexPointer> vcg::tri::HalfEdgeTopology< MeshType >::getVertices ( FacePointer  fp,
HEdgePointer  starting_he = NULL 
) [inline, static, protected]

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

Definition at line 1176 of file halfedge_topology.h.

template<class MeshType >
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

Parameters:
m Mesh
fp face to be removed
Return values:
true if face has been removed
false otherwise

Definition at line 679 of file halfedge_topology.h.

template<class MeshType >
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

Parameters:
m Mesh
fp Face to be removed

Definition at line 955 of file halfedge_topology.h.

template<class MeshType >
static EdgePointer vcg::tri::HalfEdgeTopology< MeshType >::singlet_remove ( MeshType &  m,
VertexPointer  vp 
) [inline, static]

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

Definition at line 361 of file halfedge_topology.h.

template<class MeshType >
static VertexPointer vcg::tri::HalfEdgeTopology< MeshType >::vertex_rotate ( MeshType &  m,
VertexPointer  vp 
) [inline, static]

Rotates a non-border vertex shared by only quads

Parameters:
m Mesh
vp Vertex to be rotated
Returns:
Pointer to the rotated vertex

Definition at line 503 of file halfedge_topology.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:33 2013