27#include <easy3d/core/surface_mesh.h>
28#include <easy3d/util/initializer.h>
49 mesh->add_triangle(v0, v1, v3);
50 mesh->add_triangle(v1, v2, v3);
51 mesh->add_triangle(v2, v0, v3);
52 mesh->add_triangle(v0, v2, v1);
57int main(
int argc,
char** argv) {
62 SurfaceMesh* mesh = old_mesh_from_previous_example();
68 for (
auto f : mesh->
faces()) {
73 std::cout <<
"normal of face " << f <<
": " << normals[f] << std::endl;
Definition: surface_mesh.h:257
A halfedge data structure for polygonal meshes of 2-manifold.
Definition: surface_mesh.h:52
FaceContainer faces() const
returns face container for C++11 range-based for-loops
Definition: surface_mesh.h:1685
vec3 compute_face_normal(Face f) const
compute normal vector of face f.
Definition: surface_mesh.cpp:1035
FaceProperty< T > add_face_property(const std::string &name, const T t=T())
Definition: surface_mesh.h:1395
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