Classes | |
| class | FaceCirculator |
| Circulator to move around a face. More... | |
| class | Manifold |
| A Data structure representing an open or closed manifold. Manifold keeps lists of the entities making up a halfedge mesh and provides basic functions for creating new faces, halfedges and vertices. There are also primitive operations for editing such as edge collapse. More... | |
| class | EnergyFun |
| struct | Vertex_template |
| struct | HalfEdge_template |
| struct | Face_template |
| struct | Iters |
| class | VertexCirculator |
| Circulator for moving around a vertex. More... | |
| struct | Vertex |
Typedefs | |
| typedef intptr_t | TouchType |
| Type used for the touch variables of halfedges, vertices, and faces. | |
| typedef Face_template< Iters > | Face |
|
typedef HalfEdge_template< Iters > | HalfEdge |
| typedef Vertex_template< Iters > | Vertex |
| typedef Iters::FaceList | FaceList |
| typedef Iters::HalfEdgeList | HalfEdgeList |
| typedef Iters::VertexList | VertexList |
| typedef Iters::FaceIter | FaceIter |
| typedef Iters::HalfEdgeIter | HalfEdgeIter |
| typedef Iters::VertexIter | VertexIter |
Functions | |
| void | close_holes (Manifold &m) |
| void | build_manifold (HMesh::Manifold &m, int no_vertices, const CGLA::Vec3f *vertvec, int no_faces, const int *facevec, const int *indices, const int *touch=0) |
| Build a manifold from an indexed face set. | |
| void | remove_caps_from_trimesh (HMesh::Manifold &mani, float ang_thresh) |
| A cap is a triangle with two very small angles and an angle close to pi, however a cap does not necessarily have a very short edge. | |
| void | remove_needles_from_trimesh (HMesh::Manifold &mani, float thresh) |
| A needle is a triangle with a single very short edge. | |
| int | no_edges (FaceIter v) |
| Compute the number of edges of a face. | |
| CGLA::Vec3f | normal (FaceIter f) |
| Compute the normal of a face. | |
| float | area (FaceIter f) |
| Compute the area of a face. | |
| CGLA::Vec3f | centre (FaceIter f) |
| Compute the centre of a face. | |
| bool | is_boundary (HalfEdgeIter h) |
| Returns true if the halfedge is a boundary halfedge. | |
| void | link (HalfEdgeIter, HalfEdgeIter) |
| Set the next and prev pointers of the first and second argument respectively. | |
| void | glue (HalfEdgeIter, HalfEdgeIter) |
| Glue halfedges by letting the opp pointers point to each other. | |
| float | length (HalfEdgeIter) |
| Return the geometric length of a halfedge. | |
| void | priority_queue_optimization (HMesh::Manifold &m, const EnergyFun &efun) |
| void | simulated_annealing_optimization (HMesh::Manifold &m, const EnergyFun &efun, int max_iter=10000) |
| void | minimize_dihedral_angle (HMesh::Manifold &m, int max_iter=10000, bool anneal=false, bool alpha=false, double gamma=4.0) |
| void | minimize_curvature (HMesh::Manifold &m, bool anneal=false) |
| void | minimize_gauss_curvature (HMesh::Manifold &m, bool anneal=false) |
| void | maximize_min_angle (HMesh::Manifold &m, float thresh, bool anneal=false) |
| void | optimize_valency (HMesh::Manifold &m, bool anneal=false) |
| void | randomize_mesh (HMesh::Manifold &m, int max_iter) |
| bool | obj_load (const std::string &, HMesh::Manifold &m) |
| bool | obj_save (const std::string &, HMesh::Manifold &m) |
| void | quadric_simplify (HMesh::Manifold &m, int max_work) |
| float | average_edge_length (HMesh::Manifold &mani) |
| Return the average edge length. | |
| int | refine_edges (HMesh::Manifold &mani, float t) |
| Split all edges in mesh passed as first argument which are longer than the threshold (second arg) length. | |
| void | laplacian_smooth (HMesh::Manifold &m, float t=1.0f) |
| Simple laplacian smoothing with an optional weight. | |
| void | taubin_smooth (HMesh::Manifold &m, int iter) |
| Taubin smoothing is similar to laplacian smoothing but reduces shrinkage. | |
| void | fvm_smooth (HMesh::Manifold &m, int iter) |
| Fuzzy vector median smoothing is effective when it comes to preserving sharp edges. | |
| FaceIter | get_null_face_iter () |
| VertexIter | get_null_vertex_iter () |
| HalfEdgeIter | get_null_halfedge_iter () |
| void | triangulate (HMesh::Manifold &) |
| Naive division of polygons into triangles. | |
| void | curvature_triangulate (HMesh::Manifold &m) |
| Try to respect curvature to create a better triangulation. | |
| void | safe_triangulate (HMesh::Manifold &m) |
| Naive triangulation by connecting to center point. | |
| void | shortest_edge_triangulate (Manifold &m) |
| Triangulate by connecting the points forming the shortest edge. | |
| int | valency (VertexIter v) |
| Compute valency, i.e. number of incident edges. | |
| const CGLA::Vec3f | normal (VertexIter v) |
| Compute the vertex normal. | |
| bool | is_connected (VertexIter v1, VertexIter v2) |
| Returns true if the two argument vertices are in each other's one-rings. | |
| bool | is_boundary (VertexIter v) |
| Returns true if the vertex is a boundary vertex. | |
| void | check_boundary_consistency (VertexIter v) |
| Check and enforce boundary consistency. | |
| template<class T> | |
| void | cuberille_polygonize (const Geometry::RGrid< T > &voxel_grid, HMesh::Manifold &mani, float iso, bool push=false) |
| Polygonize by stitching cube faces. | |
| template<class T> | |
| void | mc_polygonize (const Geometry::RGrid< T > &voxel_grid, HMesh::Manifold &mani, float iso) |
| Marching cubes like polygonization (hence the "mc"). | |
| bool | x3d_load (const std::string &filename, HMesh::Manifold &) |
| bool | x3d_save (const std::string &, HMesh::Manifold &m) |
| Save mesh to x3d file. | |
Apart from manifold there are also face and vertex circulators in this namespace. More advanced things are relegated to the HMeshUtil namespace.
Some applications are also found here. For instance an isosurface polygonizer and Garland Heckbert simplification has been implemented on top of HMesh.
|
|
Type used for the touch variables of halfedges, vertices, and faces. The touch variables are used to contain various data such as counters, indices, flags. In some cases it is useful to touch with the value of a pointer cast to an integer. However, this means that the integer size must be the same as the pointer size. Using "intptr_t" ensures this. |
|
|
Compute the area of a face.
|
|
|
Return the average edge length.
|
|
||||||||||||||||||||||||||||||||
|
Build a manifold from an indexed face set. The arguments are the manifold m, the number of vertices, no_vertices, the vector of vertices, vertvec, the number of faces, no_faces. facevec is an array where each entry indicates the number of vertices in that face. The array indices contains all the corresponding vertex indices in one concatenated list. touch is an optional array of touch values for the vertices. |
|
|
Compute the centre of a face.
|
|
|
Check and enforce boundary consistency.
|
|
||||||||||||||||||||||||
|
Polygonize by stitching cube faces. This function works by asscociating a small box with each voxel. A box face is recorded if it is shared by an interior voxel (whose value is greater than the isovalue) and an exterior voxel (i.e. whose value is below the isovalue). All created faces are stitched together to form a mesh. The asymptotic decider is used to do it properly. |
|
|
Try to respect curvature to create a better triangulation.
|
|
||||||||||||
|
Fuzzy vector median smoothing is effective when it comes to preserving sharp edges.
|
|
||||||||||||
|
Glue halfedges by letting the opp pointers point to each other.
|
|
|
Returns true if the vertex is a boundary vertex.
|
|
|
Returns true if the halfedge is a boundary halfedge.
|
|
||||||||||||
|
Returns true if the two argument vertices are in each other's one-rings.
|
|
||||||||||||
|
Simple laplacian smoothing with an optional weight.
|
|
|
Return the geometric length of a halfedge.
|
|
||||||||||||
|
Set the next and prev pointers of the first and second argument respectively.
|
|
||||||||||||||||||||
|
Marching cubes like polygonization (hence the "mc"). This function simply computes the dual of the result of cuberille_polygonize. That is a mesh with the same connectivity as that produced by MC, but the faces are polygons rather than triangles. The vertex positions are also computed in the same way as it is done in MC. |
|
|
Compute the number of edges of a face.
|
|
|
Compute the vertex normal. This function computes the angle weighted sum of incident face normals. |
|
|
Compute the normal of a face. If the face is not a triangle, the normal is not defined, but computed using the first three vertices of the face. |
|
||||||||||||
|
Split all edges in mesh passed as first argument which are longer than the threshold (second arg) length. A split edge results in a new vertex of valence two. We triangulate the faces on either side to ensure that there are no valence two vertices. |
|
||||||||||||
|
A cap is a triangle with two very small angles and an angle close to pi, however a cap does not necessarily have a very short edge. Set the ang_thresh to a value close to pi. The closer to pi the _less_ sensitive the cap removal. A cap is removed by flipping the (long) edge E opposite to the vertex V with the angle close to pi. However, the function is more complex. Read code and document more carefully !!! |
|
||||||||||||
|
A needle is a triangle with a single very short edge. It is moved by collapsing the short edge. The thresh parameter sets the length threshold. The position of the vertex which survives the collapse is set to one of the two end points. Selection is based on what changes the geometry least. |
|
|
Naive triangulation by connecting to center point.
|
|
|
Triangulate by connecting the points forming the shortest edge.
|
|
||||||||||||
|
Taubin smoothing is similar to laplacian smoothing but reduces shrinkage.
|
|
|
Naive division of polygons into triangles.
|
|
|
Compute valency, i.e. number of incident edges.
|
|
||||||||||||
|
Save mesh to x3d file.
|
1.4.1