2 #include <gtest/gtest.h> 3 #include <Unittests/unittests_common.hh> 8 class OpenMeshSplitCopyTriangleMesh :
public OpenMeshBase {
13 virtual void SetUp() {
19 virtual void TearDown() {
33 virtual void SetUp() {
39 virtual void TearDown() {
57 TEST_F(OpenMeshSplitCopyTriangleMesh, SplitCopyTriangleMesh) {
70 std::vector<Mesh::VertexHandle> face_vhandles;
72 face_vhandles.push_back(vhandle[2]);
73 face_vhandles.push_back(vhandle[1]);
74 face_vhandles.push_back(vhandle[0]);
76 Mesh::FaceHandle fh = mesh_.add_face(face_vhandles);
87 mesh_.add_property(fprop_int);
88 mesh_.property(fprop_int, fh) = 999;
94 Mesh::FaceIter f_it = mesh_.faces_begin();
95 Mesh::FaceIter f_end = mesh_.faces_end();
96 for (; f_it != f_end; ++f_it)
97 EXPECT_EQ(999, mesh_.property(fprop_int, *f_it)) <<
"Different Property value";
103 TEST_F(OpenMeshSplitCopyPolyMesh, SplitCopyPolymesh) {
117 std::vector<Mesh::VertexHandle> face_vhandles;
119 face_vhandles.push_back(vhandle[0]);
120 face_vhandles.push_back(vhandle[1]);
121 face_vhandles.push_back(vhandle[2]);
122 face_vhandles.push_back(vhandle[3]);
124 PolyMesh::FaceHandle fh = mesh_.add_face(face_vhandles);
135 mesh_.add_property(fprop_int);
136 mesh_.property(fprop_int, fh) = 999;
142 PolyMesh::FaceIter f_it = mesh_.faces_begin();
143 PolyMesh::FaceIter f_end = mesh_.faces_end();
144 for (; f_it != f_end; ++f_it)
145 EXPECT_EQ(999, mesh_.property(fprop_int, *f_it)) <<
"Different Property value";
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
VertexHandle split_copy(EdgeHandle _eh, const Point &_p)
Edge split (= 2-to-4 split)
VertexHandle add_vertex(const Point &_p)
Alias for new_vertex(const Point&).
Kernel::Point Point
Coordinate type.