6 #include <OpenVolumeMesh/Geometry/VectorT.hh>
9 #include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
15 int main(
int _argc,
char** _argv) {
27 std::vector<OpenVolumeMesh::VertexHandle> vertices;
30 vertices.push_back(v0); vertices.push_back(v1);vertices.push_back(v4);
34 vertices.push_back(v1); vertices.push_back(v2);vertices.push_back(v4);
38 vertices.push_back(v0); vertices.push_back(v1);vertices.push_back(v2);
42 vertices.push_back(v0); vertices.push_back(v4);vertices.push_back(v2);
46 vertices.push_back(v0); vertices.push_back(v4);vertices.push_back(v3);
50 vertices.push_back(v2); vertices.push_back(v3);vertices.push_back(v4);
54 vertices.push_back(v0); vertices.push_back(v2);vertices.push_back(v3);
57 std::vector<OpenVolumeMesh::HalfFaceHandle> halffaces;
60 halffaces.push_back(myMesh.halfface_handle(f0, 1));
61 halffaces.push_back(myMesh.halfface_handle(f1, 1));
62 halffaces.push_back(myMesh.halfface_handle(f2, 0));
63 halffaces.push_back(myMesh.halfface_handle(f3, 1));
64 myMesh.add_cell(halffaces);
68 halffaces.push_back(myMesh.halfface_handle(f4, 1));
69 halffaces.push_back(myMesh.halfface_handle(f5, 1));
70 halffaces.push_back(myMesh.halfface_handle(f3, 0));
71 halffaces.push_back(myMesh.halfface_handle(f6, 0));
72 myMesh.add_cell(halffaces);
76 v_it != myMesh.vertices_end(); ++v_it) {
78 std::cout <<
"Position of vertex " << v_it->idx() <<
": " <<
79 myMesh.
vertex(*v_it) << std::endl;
const VecT & vertex(const VertexHandle &_vh) const
Get point _vh's coordinates.
virtual VertexHandle add_vertex()
Override of empty add_vertex function.