Commit 8d949179 authored by Mike Kremer's avatar Mike Kremer

Corrected tutorial 1 code

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@80 66977474-1d4b-4f09-8fe9-267525286df2
parent 4db24c8b
......@@ -56,48 +56,48 @@ std::vector<PolyhedralMeshV3d::VertexHandle> vertices;
// Add faces
vertices.push_back(v0); vertices.push_back(v1);vertices.push_back(v3);
PolyhedralMeshV3d::FaceHandle f0 = _mesh.add_face(vertices);
PolyhedralMeshV3d::FaceHandle f0 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v2); vertices.push_back(v0);vertices.push_back(v3);
PolyhedralMeshV3d::FaceHandle f1 = _mesh.add_face(vertices);
PolyhedralMeshV3d::FaceHandle f1 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v0); vertices.push_back(v2);vertices.push_back(v1);
PolyhedralMeshV3d::FaceHandle f2 = _mesh.add_face(vertices);
PolyhedralMeshV3d::FaceHandle f2 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v1); vertices.push_back(v4);vertices.push_back(v3);
PolyhedralMeshV3d::FaceHandle f3 = _mesh.add_face(vertices);
PolyhedralMeshV3d::FaceHandle f3 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v2); vertices.push_back(v3);vertices.push_back(v4);
PolyhedralMeshV3d::FaceHandle f4 = _mesh.add_face(vertices);
PolyhedralMeshV3d::FaceHandle f4 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v2); vertices.push_back(v4);vertices.push_back(v1);
PolyhedralMeshV3d::FaceHandle f5 = _mesh.add_face(vertices);
PolyhedralMeshV3d::FaceHandle f5 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v1); vertices.push_back(v2);vertices.push_back(v3);
PolyhedralMeshV3d::FaceHandle f6 = _mesh.add_face(vertices);
PolyhedralMeshV3d::FaceHandle f6 = myMesh.add_face(vertices);
std::vector<PolyhedralMeshV3d::HalfFaceHandle> halffaces;
// Add first tetrahedron
halffaces.push_back(_mesh.halfface_handle(f0, 1));
halffaces.push_back(_mesh.halfface_handle(f1, 1));
halffaces.push_back(_mesh.halfface_handle(f2, 1));
halffaces.push_back(_mesh.halfface_handle(f6, 1));
_mesh.add_cell(halffaces);
halffaces.push_back(myMesh.halfface_handle(f0, 1));
halffaces.push_back(myMesh.halfface_handle(f1, 1));
halffaces.push_back(myMesh.halfface_handle(f2, 1));
halffaces.push_back(myMesh.halfface_handle(f6, 1));
myMesh.add_cell(halffaces);
// Add second tetrahedron
halffaces.clear();
halffaces.push_back(_mesh.halfface_handle(f3, 1));
halffaces.push_back(_mesh.halfface_handle(f4, 1));
halffaces.push_back(_mesh.halfface_handle(f5, 1));
halffaces.push_back(_mesh.halfface_handle(f6, 0));
_mesh.add_cell(halffaces);
halffaces.push_back(myMesh.halfface_handle(f3, 1));
halffaces.push_back(myMesh.halfface_handle(f4, 1));
halffaces.push_back(myMesh.halfface_handle(f5, 1));
halffaces.push_back(myMesh.halfface_handle(f6, 0));
myMesh.add_cell(halffaces);
\endcode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment