Developer Documentation

unittests_delete_face.cc
1
2 #include <gtest/gtest.h>
3 #include <Unittests/unittests_common.hh>
4 #include <iostream>
5
6 namespace {
7
8 class OpenMeshDeleteFaceTriangleMesh : public OpenMeshBase {
9
10 protected:
11
12 // This function is called before each test is run
13 virtual void SetUp() {
14
15 // Do some initial stuff with the member data here...
16 }
17
18 // This function is called after all tests are through
19 virtual void TearDown() {
20
21 // Do some final stuff with the member data here...
22 }
23
24 // Member already defined in OpenMeshBase
25 //Mesh mesh_;
26 };
27
28 class OpenMeshDeleteFacePolyMesh : public OpenMeshBasePoly {
29
30 protected:
31
32 // This function is called before each test is run
33 virtual void SetUp() {
34
35 // Do some initial stuff with the member data here...
36 }
37
38 // This function is called after all tests are through
39 virtual void TearDown() {
40
41 // Do some final stuff with the member data here...
42 }
43
44 // Member already defined in OpenMeshBase
45 //Mesh mesh_;
46 };
47
48 /*
49 * ====================================================================
50 * Define tests below
51 * ====================================================================
52 */
53
54 /* Adds a cube to a trimesh and then deletes half of the faces
55 * It does not request edge status!
56 */
57 TEST_F(OpenMeshDeleteFaceTriangleMesh, DeleteHalfTriangleMeshCubeNoEdgeStatus) {
58
59 mesh_.clear();
60
61 // Add some vertices
62 Mesh::VertexHandle vhandle[8];
63 vhandle[0] = mesh_.add_vertex(Mesh::Point(-1, -1, 1));
64 vhandle[1] = mesh_.add_vertex(Mesh::Point( 1, -1, 1));
65 vhandle[2] = mesh_.add_vertex(Mesh::Point( 1, 1, 1));
66 vhandle[3] = mesh_.add_vertex(Mesh::Point(-1, 1, 1));
67 vhandle[4] = mesh_.add_vertex(Mesh::Point(-1, -1, -1));
68 vhandle[5] = mesh_.add_vertex(Mesh::Point( 1, -1, -1));
69 vhandle[6] = mesh_.add_vertex(Mesh::Point( 1, 1, -1));
70 vhandle[7] = mesh_.add_vertex(Mesh::Point(-1, 1, -1));
71
72 // Add six faces to form a cube
73 std::vector<Mesh::VertexHandle> face_vhandles;
74
75 face_vhandles.clear();
76 face_vhandles.push_back(vhandle[0]);
77 face_vhandles.push_back(vhandle[1]);
78 face_vhandles.push_back(vhandle[3]);
79 mesh_.add_face(face_vhandles);
80
81 face_vhandles.clear();
82 face_vhandles.push_back(vhandle[1]);
83 face_vhandles.push_back(vhandle[2]);
84 face_vhandles.push_back(vhandle[3]);
85 mesh_.add_face(face_vhandles);
86
87 //=======================
88
89 face_vhandles.clear();
90 face_vhandles.push_back(vhandle[7]);
91 face_vhandles.push_back(vhandle[6]);
92 face_vhandles.push_back(vhandle[5]);
93 mesh_.add_face(face_vhandles);
94
95 face_vhandles.clear();
96 face_vhandles.push_back(vhandle[7]);
97 face_vhandles.push_back(vhandle[5]);
98 face_vhandles.push_back(vhandle[4]);
99 mesh_.add_face(face_vhandles);
100
101 //=======================
102
103 face_vhandles.clear();
104 face_vhandles.push_back(vhandle[1]);
105 face_vhandles.push_back(vhandle[0]);
106 face_vhandles.push_back(vhandle[4]);
107 mesh_.add_face(face_vhandles);
108
109 face_vhandles.clear();
110 face_vhandles.push_back(vhandle[1]);
111 face_vhandles.push_back(vhandle[4]);
112 face_vhandles.push_back(vhandle[5]);
113 mesh_.add_face(face_vhandles);
114
115 //=======================
116
117 face_vhandles.clear();
118 face_vhandles.push_back(vhandle[2]);
119 face_vhandles.push_back(vhandle[1]);
120 face_vhandles.push_back(vhandle[5]);
121 mesh_.add_face(face_vhandles);
122
123 face_vhandles.clear();
124 face_vhandles.push_back(vhandle[2]);
125 face_vhandles.push_back(vhandle[5]);
126 face_vhandles.push_back(vhandle[6]);
127 mesh_.add_face(face_vhandles);
128
129
130 //=======================
131
132 face_vhandles.clear();
133 face_vhandles.push_back(vhandle[3]);
134 face_vhandles.push_back(vhandle[2]);
135 face_vhandles.push_back(vhandle[6]);
136 mesh_.add_face(face_vhandles);
137
138 face_vhandles.clear();
139 face_vhandles.push_back(vhandle[3]);
140 face_vhandles.push_back(vhandle[6]);
141 face_vhandles.push_back(vhandle[7]);
142 mesh_.add_face(face_vhandles);
143
144 //=======================
145
146 face_vhandles.clear();
147 face_vhandles.push_back(vhandle[0]);
148 face_vhandles.push_back(vhandle[3]);
149 face_vhandles.push_back(vhandle[7]);
150 mesh_.add_face(face_vhandles);
151
152 face_vhandles.clear();
153 face_vhandles.push_back(vhandle[0]);
154 face_vhandles.push_back(vhandle[7]);
155 face_vhandles.push_back(vhandle[4]);
156 mesh_.add_face(face_vhandles);
157
158
159 // Test setup:
160 //
161 //
162 // 3 ======== 2
163 // / /|
164 // / / | z
165 // 0 ======== 1 | |
166 // | | | | y
167 // | 7 | 6 | /
168 // | | / | /
169 // | |/ |/
170 // 4 ======== 5 -------> x
171 //
172
173 // Check setup
174 EXPECT_EQ(18u, mesh_.n_edges() ) << "Wrong number of Edges";
175 EXPECT_EQ(36u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges";
176 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices";
177 EXPECT_EQ(12u, mesh_.n_faces() ) << "Wrong number of faces";
178
179 // =====================================================
180 // Now we delete half of the mesh
181 // =====================================================
182 mesh_.request_face_status();
183 mesh_.request_vertex_status();
184 mesh_.request_halfedge_status();
185 const size_t n_face_to_delete = mesh_.n_faces()/2;
186
187 // Check the variable
188 EXPECT_EQ(6u, n_face_to_delete ) << "Wrong number of faces to delete";
189
190 for(size_t i = 0; i < n_face_to_delete; i++)
191 mesh_.delete_face(mesh_.face_handle(int(i)));
192
193 // =====================================================
194 // Check config afterwards
195 // =====================================================
196
197 EXPECT_EQ(18u, mesh_.n_edges() ) << "Wrong number of Edges after marking as deleted";
198 EXPECT_EQ(36u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges after marking as deleted";
199 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after marking as deleted";
200 EXPECT_EQ(12u, mesh_.n_faces() ) << "Wrong number of faces after marking as deleted";
201
202
203 // =====================================================
204 // Cleanup and recheck
205 // =====================================================
206 mesh_.garbage_collection();
207
208 EXPECT_EQ(18u, mesh_.n_edges() ) << "Wrong number of Edges after garbage collection";
209 EXPECT_EQ(36u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges after garbage collection";
210 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after garbage collection";
211 EXPECT_EQ(6u, mesh_.n_faces() ) << "Wrong number of faces after garbage collection";
212 }
213
214
215 /* Adds a cube to a trimesh and then deletes half of the faces
216 */
217 TEST_F(OpenMeshDeleteFaceTriangleMesh, DeleteHalfTriangleMeshCubeWithEdgeStatus) {
218
219 mesh_.clear();
220
221 // Add some vertices
222 Mesh::VertexHandle vhandle[8];
223 vhandle[0] = mesh_.add_vertex(Mesh::Point(-1, -1, 1));
224 vhandle[1] = mesh_.add_vertex(Mesh::Point( 1, -1, 1));
225 vhandle[2] = mesh_.add_vertex(Mesh::Point( 1, 1, 1));
226 vhandle[3] = mesh_.add_vertex(Mesh::Point(-1, 1, 1));
227 vhandle[4] = mesh_.add_vertex(Mesh::Point(-1, -1, -1));
228 vhandle[5] = mesh_.add_vertex(Mesh::Point( 1, -1, -1));
229 vhandle[6] = mesh_.add_vertex(Mesh::Point( 1, 1, -1));
230 vhandle[7] = mesh_.add_vertex(Mesh::Point(-1, 1, -1));
231
232 // Add six faces to form a cube
233 std::vector<Mesh::VertexHandle> face_vhandles;
234
235 face_vhandles.clear();
236 face_vhandles.push_back(vhandle[0]);
237 face_vhandles.push_back(vhandle[1]);
238 face_vhandles.push_back(vhandle[3]);
239 mesh_.add_face(face_vhandles);
240
241 face_vhandles.clear();
242 face_vhandles.push_back(vhandle[1]);
243 face_vhandles.push_back(vhandle[2]);
244 face_vhandles.push_back(vhandle[3]);
245 mesh_.add_face(face_vhandles);
246
247 //=======================
248
249 face_vhandles.clear();
250 face_vhandles.push_back(vhandle[7]);
251 face_vhandles.push_back(vhandle[6]);
252 face_vhandles.push_back(vhandle[5]);
253 mesh_.add_face(face_vhandles);
254
255 face_vhandles.clear();
256 face_vhandles.push_back(vhandle[7]);
257 face_vhandles.push_back(vhandle[5]);
258 face_vhandles.push_back(vhandle[4]);
259 mesh_.add_face(face_vhandles);
260
261 //=======================
262
263 face_vhandles.clear();
264 face_vhandles.push_back(vhandle[1]);
265 face_vhandles.push_back(vhandle[0]);
266 face_vhandles.push_back(vhandle[4]);
267 mesh_.add_face(face_vhandles);
268
269 face_vhandles.clear();
270 face_vhandles.push_back(vhandle[1]);
271 face_vhandles.push_back(vhandle[4]);
272 face_vhandles.push_back(vhandle[5]);
273 mesh_.add_face(face_vhandles);
274
275 //=======================
276
277 face_vhandles.clear();
278 face_vhandles.push_back(vhandle[2]);
279 face_vhandles.push_back(vhandle[1]);
280 face_vhandles.push_back(vhandle[5]);
281 mesh_.add_face(face_vhandles);
282
283 face_vhandles.clear();
284 face_vhandles.push_back(vhandle[2]);
285 face_vhandles.push_back(vhandle[5]);
286 face_vhandles.push_back(vhandle[6]);
287 mesh_.add_face(face_vhandles);
288
289
290 //=======================
291
292 face_vhandles.clear();
293 face_vhandles.push_back(vhandle[3]);
294 face_vhandles.push_back(vhandle[2]);
295 face_vhandles.push_back(vhandle[6]);
296 mesh_.add_face(face_vhandles);
297
298 face_vhandles.clear();
299 face_vhandles.push_back(vhandle[3]);
300 face_vhandles.push_back(vhandle[6]);
301 face_vhandles.push_back(vhandle[7]);
302 mesh_.add_face(face_vhandles);
303
304 //=======================
305
306 face_vhandles.clear();
307 face_vhandles.push_back(vhandle[0]);
308 face_vhandles.push_back(vhandle[3]);
309 face_vhandles.push_back(vhandle[7]);
310 mesh_.add_face(face_vhandles);
311
312 face_vhandles.clear();
313 face_vhandles.push_back(vhandle[0]);
314 face_vhandles.push_back(vhandle[7]);
315 face_vhandles.push_back(vhandle[4]);
316 mesh_.add_face(face_vhandles);
317
318
319 // Test setup:
320 //
321 //
322 // 3 ======== 2
323 // / /|
324 // / / | z
325 // 0 ======== 1 | |
326 // | | | | y
327 // | 7 | 6 | /
328 // | | / | /
329 // | |/ |/
330 // 4 ======== 5 -------> x
331 //
332
333 // Check setup
334 EXPECT_EQ(18u, mesh_.n_edges() ) << "Wrong number of Edges";
335 EXPECT_EQ(36u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges";
336 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices";
337 EXPECT_EQ(12u, mesh_.n_faces() ) << "Wrong number of faces";
338
339 // =====================================================
340 // Now we delete half of the mesh
341 // =====================================================
342 mesh_.request_face_status();
343 mesh_.request_vertex_status();
344 mesh_.request_edge_status();
345 mesh_.request_halfedge_status();
346 const size_t n_face_to_delete = mesh_.n_faces()/2;
347
348 // Check the variable
349 EXPECT_EQ(6u, n_face_to_delete ) << "Wrong number of faces to delete";
350
351 for(size_t i = 0; i < n_face_to_delete; i++)
352 mesh_.delete_face(mesh_.face_handle(int(i)));
353
354 // =====================================================
355 // Check config afterwards
356 // =====================================================
357
358 EXPECT_EQ(18u, mesh_.n_edges() ) << "Wrong number of Edges after marking as deleted";
359 EXPECT_EQ(36u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges after marking as deleted";
360 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after marking as deleted";
361 EXPECT_EQ(12u, mesh_.n_faces() ) << "Wrong number of faces after marking as deleted";
362
363
364 // =====================================================
365 // Cleanup and recheck
366 // =====================================================
367 mesh_.garbage_collection();
368
369 EXPECT_EQ(13u, mesh_.n_edges() ) << "Wrong number of Edges after garbage collection";
370 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after garbage collection";
371 EXPECT_EQ(6u, mesh_.n_faces() ) << "Wrong number of faces after garbage collection";
372 }
373
374
375
376 /* Adds a cube to a polymesh
377 * And delete half of it.
378 * Does not request edge status
379 */
380 TEST_F(OpenMeshDeleteFacePolyMesh, DeleteteHalfPolyMeshCubeWithoutEdgeStatus) {
381
382 mesh_.clear();
383
384 // Add some vertices
385 Mesh::VertexHandle vhandle[8];
386 vhandle[0] = mesh_.add_vertex(PolyMesh::Point(-1, -1, 1));
387 vhandle[1] = mesh_.add_vertex(PolyMesh::Point( 1, -1, 1));
388 vhandle[2] = mesh_.add_vertex(PolyMesh::Point( 1, 1, 1));
389 vhandle[3] = mesh_.add_vertex(PolyMesh::Point(-1, 1, 1));
390 vhandle[4] = mesh_.add_vertex(PolyMesh::Point(-1, -1, -1));
391 vhandle[5] = mesh_.add_vertex(PolyMesh::Point( 1, -1, -1));
392 vhandle[6] = mesh_.add_vertex(PolyMesh::Point( 1, 1, -1));
393 vhandle[7] = mesh_.add_vertex(PolyMesh::Point(-1, 1, -1));
394
395 // Add six faces to form a cube
396 std::vector<Mesh::VertexHandle> face_vhandles;
397
398 face_vhandles.clear();
399 face_vhandles.push_back(vhandle[0]);
400 face_vhandles.push_back(vhandle[1]);
401 face_vhandles.push_back(vhandle[2]);
402 face_vhandles.push_back(vhandle[3]);
403 mesh_.add_face(face_vhandles);
404
405 face_vhandles.clear();
406 face_vhandles.push_back(vhandle[7]);
407 face_vhandles.push_back(vhandle[6]);
408 face_vhandles.push_back(vhandle[5]);
409 face_vhandles.push_back(vhandle[4]);
410 mesh_.add_face(face_vhandles);
411
412 face_vhandles.clear();
413 face_vhandles.push_back(vhandle[1]);
414 face_vhandles.push_back(vhandle[0]);
415 face_vhandles.push_back(vhandle[4]);
416 face_vhandles.push_back(vhandle[5]);
417 mesh_.add_face(face_vhandles);
418
419 face_vhandles.clear();
420 face_vhandles.push_back(vhandle[2]);
421 face_vhandles.push_back(vhandle[1]);
422 face_vhandles.push_back(vhandle[5]);
423 face_vhandles.push_back(vhandle[6]);
424 mesh_.add_face(face_vhandles);
425
426 face_vhandles.clear();
427 face_vhandles.push_back(vhandle[3]);
428 face_vhandles.push_back(vhandle[2]);
429 face_vhandles.push_back(vhandle[6]);
430 face_vhandles.push_back(vhandle[7]);
431 mesh_.add_face(face_vhandles);
432
433 face_vhandles.clear();
434 face_vhandles.push_back(vhandle[0]);
435 face_vhandles.push_back(vhandle[3]);
436 face_vhandles.push_back(vhandle[7]);
437 face_vhandles.push_back(vhandle[4]);
438 mesh_.add_face(face_vhandles);
439
440
441 // Test setup:
442 //
443 //
444 // 3 ======== 2
445 // / /|
446 // / / | z
447 // 0 ======== 1 | |
448 // | | | | y
449 // | 7 | 6 | /
450 // | | / | /
451 // | |/ |/
452 // 4 ======== 5 -------> x
453 //
454
455 // Check setup
456 EXPECT_EQ(12u, mesh_.n_edges() ) << "Wrong number of Edges";
457 EXPECT_EQ(24u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges";
458 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices";
459 EXPECT_EQ(6u, mesh_.n_faces() ) << "Wrong number of faces";
460
461 // =====================================================
462 // Now we delete half of the mesh
463 // =====================================================
464 mesh_.request_face_status();
465 mesh_.request_vertex_status();
466 mesh_.request_halfedge_status();
467 const size_t n_face_to_delete = mesh_.n_faces()/2;
468
469 // Check the variable
470 EXPECT_EQ(3u, n_face_to_delete ) << "Wrong number of faces to delete";
471
472 for(size_t i = 0; i < n_face_to_delete; i++)
473 mesh_.delete_face(mesh_.face_handle(int(i)));
474
475 // =====================================================
476 // Check config afterwards
477 // =====================================================
478
479 EXPECT_EQ(12u, mesh_.n_edges() ) << "Wrong number of Edges after marking as deleted";
480 EXPECT_EQ(24u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges after marking as deleted";
481 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after marking as deleted";
482 EXPECT_EQ(6u, mesh_.n_faces() ) << "Wrong number of faces after marking as deleted";
483
484 // =====================================================
485 // Cleanup and recheck
486 // =====================================================
487 mesh_.garbage_collection();
488
489 EXPECT_EQ(12u, mesh_.n_edges() ) << "Wrong number of Edges after garbage collection";
490 EXPECT_EQ(24u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges after garbage collection";
491 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after garbage collection";
492 EXPECT_EQ(3u, mesh_.n_faces() ) << "Wrong number of faces after garbage collection";
493
494 }
495
496 /* Adds a cube to a polymesh
497 * And delete half of it.
498 */
499 TEST_F(OpenMeshDeleteFacePolyMesh, DeleteteHalfPolyMeshCubeWithEdgeStatus) {
500
501 mesh_.clear();
502
503 // Add some vertices
504 Mesh::VertexHandle vhandle[8];
505 vhandle[0] = mesh_.add_vertex(PolyMesh::Point(-1, -1, 1));
506 vhandle[1] = mesh_.add_vertex(PolyMesh::Point( 1, -1, 1));
507 vhandle[2] = mesh_.add_vertex(PolyMesh::Point( 1, 1, 1));
508 vhandle[3] = mesh_.add_vertex(PolyMesh::Point(-1, 1, 1));
509 vhandle[4] = mesh_.add_vertex(PolyMesh::Point(-1, -1, -1));
510 vhandle[5] = mesh_.add_vertex(PolyMesh::Point( 1, -1, -1));
511 vhandle[6] = mesh_.add_vertex(PolyMesh::Point( 1, 1, -1));
512 vhandle[7] = mesh_.add_vertex(PolyMesh::Point(-1, 1, -1));
513
514 // Add six faces to form a cube
515 std::vector<Mesh::VertexHandle> face_vhandles;
516
517 face_vhandles.clear();
518 face_vhandles.push_back(vhandle[0]);
519 face_vhandles.push_back(vhandle[1]);
520 face_vhandles.push_back(vhandle[2]);
521 face_vhandles.push_back(vhandle[3]);
522 mesh_.add_face(face_vhandles);
523
524 face_vhandles.clear();
525 face_vhandles.push_back(vhandle[7]);
526 face_vhandles.push_back(vhandle[6]);
527 face_vhandles.push_back(vhandle[5]);
528 face_vhandles.push_back(vhandle[4]);
529 mesh_.add_face(face_vhandles);
530
531 face_vhandles.clear();
532 face_vhandles.push_back(vhandle[1]);
533 face_vhandles.push_back(vhandle[0]);
534 face_vhandles.push_back(vhandle[4]);
535 face_vhandles.push_back(vhandle[5]);
536 mesh_.add_face(face_vhandles);
537
538 face_vhandles.clear();
539 face_vhandles.push_back(vhandle[2]);
540 face_vhandles.push_back(vhandle[1]);
541 face_vhandles.push_back(vhandle[5]);
542 face_vhandles.push_back(vhandle[6]);
543 mesh_.add_face(face_vhandles);
544
545 face_vhandles.clear();
546 face_vhandles.push_back(vhandle[3]);
547 face_vhandles.push_back(vhandle[2]);
548 face_vhandles.push_back(vhandle[6]);
549 face_vhandles.push_back(vhandle[7]);
550 mesh_.add_face(face_vhandles);
551
552 face_vhandles.clear();
553 face_vhandles.push_back(vhandle[0]);
554 face_vhandles.push_back(vhandle[3]);
555 face_vhandles.push_back(vhandle[7]);
556 face_vhandles.push_back(vhandle[4]);
557 mesh_.add_face(face_vhandles);
558
559
560 // Test setup:
561 //
562 //
563 // 3 ======== 2
564 // / /|
565 // / / | z
566 // 0 ======== 1 | |
567 // | | | | y
568 // | 7 | 6 | /
569 // | | / | /
570 // | |/ |/
571 // 4 ======== 5 -------> x
572 //
573
574 // Check setup
575 EXPECT_EQ(12u, mesh_.n_edges() ) << "Wrong number of Edges";
576 EXPECT_EQ(24u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges";
577 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices";
578 EXPECT_EQ(6u, mesh_.n_faces() ) << "Wrong number of faces";
579
580 // =====================================================
581 // Now we delete half of the mesh
582 // =====================================================
583 mesh_.request_face_status();
584 mesh_.request_vertex_status();
585 mesh_.request_edge_status();
586 mesh_.request_halfedge_status();
587 const size_t n_face_to_delete = mesh_.n_faces()/2;
588
589 // Check the variable
590 EXPECT_EQ(3u, n_face_to_delete ) << "Wrong number of faces to delete";
591
592 for(size_t i = 0; i < n_face_to_delete; i++)
593 mesh_.delete_face(mesh_.face_handle(int(i)));
594
595 // =====================================================
596 // Check config afterwards
597 // =====================================================
598
599 EXPECT_EQ(12u, mesh_.n_edges() ) << "Wrong number of Edges after marking as deleted";
600 EXPECT_EQ(24u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges after marking as deleted";
601 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after marking as deleted";
602 EXPECT_EQ(6u, mesh_.n_faces() ) << "Wrong number of faces after marking as deleted";
603
604 // =====================================================
605 // Cleanup and recheck
606 // =====================================================
607 mesh_.garbage_collection();
608
609 EXPECT_EQ(10u, mesh_.n_edges() ) << "Wrong number of Edges after garbage collection";
610 EXPECT_EQ(20u, mesh_.n_halfedges() ) << "Wrong number of HalfEdges after garbage collection";
611 EXPECT_EQ(8u, mesh_.n_vertices() ) << "Wrong number of vertices after garbage collection";
612 EXPECT_EQ(3u, mesh_.n_faces() ) << "Wrong number of faces after garbage collection";
613
614 }
615
616 }
OpenMesh::PolyMeshT::Point
Kernel::Point Point
Coordinate type.
Definition: PolyMeshT.hh:112
OpenMesh::PolyMeshT::add_vertex
VertexHandle add_vertex(const Point &_p)
Alias for new_vertex(const Point&).
Definition: PolyMeshT.hh:235
OpenMesh::PolyMeshT::VertexHandle
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
Definition: PolyMeshT.hh:136
OpenMeshBase
Definition: unittests_common.hh:26
OpenMeshBasePoly
Definition: unittests_common.hh:50