27#include <easy3d/core/surface_mesh.h>
28#include <easy3d/core/surface_mesh_builder.h>
29#include <easy3d/util/initializer.h>
39int main(
int argc,
char** argv) {
64 const std::vector<vec3> points = {
87 else if (option == 2) {
103 LOG(ERROR) <<
"option must be 1 or 2";
105 std::cout <<
"#face: " << mesh.
n_faces() << std::endl;
106 std::cout <<
"#vertex: " << mesh.
n_vertices() << std::endl;
107 std::cout <<
"#edge: " << mesh.
n_edges() << std::endl;
A helper class for constructing manifold surface mesh models.
Definition: surface_mesh_builder.h:56
void end_surface(bool log_issues=true)
Finalize surface construction. Must be called at the end of the surface construction and used in pair...
Definition: surface_mesh_builder.cpp:69
Face add_triangle(Vertex v1, Vertex v2, Vertex v3)
Add a new triangle face connecting vertices v1, v2, and v3.
Definition: surface_mesh_builder.cpp:355
Vertex add_vertex(const vec3 &p)
Add a vertex to the mesh.
Definition: surface_mesh_builder.cpp:228
void begin_surface()
Begin surface construction. Must be called at the beginning of the surface construction and used in p...
Definition: surface_mesh_builder.cpp:54
A halfedge data structure for polygonal meshes of 2-manifold.
Definition: surface_mesh.h:52
unsigned int n_faces() const
returns number of faces in the mesh
Definition: surface_mesh.h:1076
unsigned int n_edges() const
returns number of edges in the mesh
Definition: surface_mesh.h:1074
Face add_triangle(Vertex v1, Vertex v2, Vertex v3)
Definition: surface_mesh.cpp:491
Vertex add_vertex(const vec3 &p)
add a new vertex with position p
Definition: surface_mesh.h:1034
unsigned int n_vertices() const
returns number of vertices in the mesh
Definition: surface_mesh.h:1070
Definition: collider.cpp:182
void initialize(bool use_log_file, bool use_setting_file, const std::string &resource_dir)
Initialization of Easy3D.
Definition: initializer.cpp:35
Definition: surface_mesh.h:104