Files
ViewDesignEngine/examples/03_mesh/main.cpp
T

19 lines
528 B
C++

#include <iostream>
#include "vde/mesh/halfedge_mesh.h"
int main() {
using namespace vde::mesh;
HalfedgeMesh mesh;
mesh.build_from_triangles(
{{0,0,0},{1,0,0},{0,1,0},{1,1,0}},
{{0,1,2},{1,3,2}}
);
std::cout << "V: " << mesh.num_vertices()
<< " F: " << mesh.num_faces()
<< " E: " << mesh.num_edges() << "\n";
auto b = mesh.bounds();
std::cout << "Bounds: (" << b.min().transpose() << ") - ("
<< b.max().transpose() << ")\n";
return 0;
}