Line 4... |
Line 4... |
4 |
* For license and list of authors, see ../../doc/intro.pdf
|
4 |
* For license and list of authors, see ../../doc/intro.pdf
|
5 |
* ----------------------------------------------------------------------- */
|
5 |
* ----------------------------------------------------------------------- */
|
6 |
|
6 |
|
7 |
/**
|
7 |
/**
|
8 |
* @file Manifold.h
|
8 |
* @file Manifold.h
|
9 |
* @brief The Manifold class is the main data structure of a HMesh - the actual mesh.
|
9 |
* @brief The Manifold class is the main data structure of HMesh - the actual mesh.
|
10 |
*/
|
10 |
*/
|
11 |
|
11 |
|
12 |
#ifndef __HMESH_MANIFOLD_H__
|
12 |
#ifndef __HMESH_MANIFOLD_H__
|
13 |
#define __HMESH_MANIFOLD_H__
|
13 |
#define __HMESH_MANIFOLD_H__
|
14 |
|
14 |
|
Line 67... |
Line 67... |
67 |
const int* indices);
|
67 |
const int* indices);
|
68 |
|
68 |
|
69 |
/// Build a manifold from a TriMesh
|
69 |
/// Build a manifold from a TriMesh
|
70 |
void build(const Geometry::TriMesh& mesh);
|
70 |
void build(const Geometry::TriMesh& mesh);
|
71 |
|
71 |
|
- |
|
72 |
/// Add a face to the Manifold
|
- |
|
73 |
FaceID add_face(std::vector<Manifold::Vec> points);
|
- |
|
74 |
|
- |
|
75 |
// /** Removes a face from the Manifold. If it is an interior face it is simply replaces
|
- |
|
76 |
// by an InvalidFaceID. If the face contains boundary edges, these go away. */
|
- |
|
77 |
// bool remove_face(FaceID fid);
|
- |
|
78 |
//
|
- |
|
79 |
// /** Remove an edge from the Manifold.
|
- |
|
80 |
// This function will remove the faces on either side and the edge itself in the process. */
|
- |
|
81 |
// bool remove_edge(HalfEdgeID hid);
|
- |
|
82 |
//
|
- |
|
83 |
// /** Remove a vertex from the Manifold.
|
- |
|
84 |
// This function merges all faces around the vertex into one and then removes
|
- |
|
85 |
// this resulting face. */
|
- |
|
86 |
// bool remove_vertex(VertexID vid);
|
72 |
|
87 |
|
73 |
/// number of vertices
|
88 |
/// number of vertices
|
74 |
size_t no_vertices() const { return kernel.no_vertices();}
|
89 |
size_t no_vertices() const { return kernel.no_vertices();}
|
75 |
/// number of active faces
|
90 |
/// number of active faces
|
76 |
size_t no_faces() const { return kernel.no_faces();}
|
91 |
size_t no_faces() const { return kernel.no_faces();}
|
Line 171... |
Line 186... |
171 |
Note that this function can create some unusual and arguably degenerate meshes. For instance,
|
186 |
Note that this function can create some unusual and arguably degenerate meshes. For instance,
|
172 |
two triangles which share all vertices is collapsed to a single pair of vertices connected by
|
187 |
two triangles which share all vertices is collapsed to a single pair of vertices connected by
|
173 |
a pair of halfedges bounding the same face. */
|
188 |
a pair of halfedges bounding the same face. */
|
174 |
FaceID merge_one_ring(VertexID v, float max_loop_length = FLT_MAX);
|
189 |
FaceID merge_one_ring(VertexID v, float max_loop_length = FLT_MAX);
|
175 |
|
190 |
|
176 |
/// \brief Close hole given by the invalid face of halfedgehandle h.
|
191 |
/** \brief Close hole given by the invalid face of halfedgehandle h.
|
- |
|
192 |
returns FaceID of the created face or the face that is already there if the
|
- |
|
193 |
face was not InvalidFaceID. */
|
177 |
void close_hole(HalfEdgeID h);
|
194 |
FaceID close_hole(HalfEdgeID h);
|
178 |
|
195 |
|
179 |
/// \brief Flip an edge h.
|
196 |
/// \brief Flip an edge h.
|
180 |
void flip_edge(HalfEdgeID h);
|
197 |
void flip_edge(HalfEdgeID h);
|
181 |
|
198 |
|
182 |
/// Return reference to position given by VertexID
|
199 |
/// Return reference to position given by VertexID
|
183 |
Vec& pos(VertexID id);
|
200 |
Vec& pos(VertexID id);
|
184 |
/// Return const reference to position given by VertexID
|
201 |
/// Return const reference to position given by VertexID
|
185 |
const Vec& pos(VertexID id) const;
|
202 |
const Vec& pos(VertexID id) const;
|
186 |
|
203 |
|
187 |
/// Clear the mesh
|
204 |
/// Clear the mesh. Remove all faces, halfedges, and vertices.
|
188 |
void clear();
|
205 |
void clear();
|
189 |
|
206 |
|
190 |
/// Remove unused items from Mesh, map argument is to be used for attribute vector cleanups in order to maintain sync.
|
207 |
/// Remove unused items from Mesh, map argument is to be used for attribute vector cleanups in order to maintain sync.
|
191 |
void cleanup(IDRemap& map);
|
208 |
void cleanup(IDRemap& map);
|
192 |
/// Remove unused items from Mesh
|
209 |
/// Remove unused items from Mesh
|