| 269 | } |
| 270 | |
| 271 | void test_delete_all( const geode::TriangulatedSurface3D& triangulated_surface, |
| 272 | geode::TriangulatedSurfaceBuilder3D& builder ) |
| 273 | { |
| 274 | builder.delete_isolated_vertices(); |
| 275 | geode::OpenGeodeMeshException::test( |
| 276 | triangulated_surface.nb_vertices() == 3, |
| 277 | "[Test]TriangulatedSurface should have 3 vertices" ); |
| 278 | geode::OpenGeodeMeshException::test( |
| 279 | triangulated_surface.edges().nb_edges() == 3, |
| 280 | "[Test]TriangulatedSurface should have 3 edges" ); |
| 281 | geode::OpenGeodeMeshException::test( |
| 282 | triangulated_surface.nb_polygons() == 1, |
| 283 | "[Test]TriangulatedSurface should have 1 polygon" ); |
| 284 | |
| 285 | std::vector< bool > to_delete( triangulated_surface.nb_polygons(), true ); |
| 286 | builder.delete_polygons( to_delete ); |
| 287 | geode::OpenGeodeMeshException::test( |
| 288 | triangulated_surface.nb_vertices() == 3, |
| 289 | "[Test]TriangulatedSurface should have 3 vertices" ); |
| 290 | builder.edges_builder().delete_isolated_edges(); |
| 291 | geode::OpenGeodeMeshException::test( |
| 292 | triangulated_surface.edges().nb_edges() == 0, |
| 293 | "[Test]TriangulatedSurface should have 0 edge" ); |
| 294 | geode::OpenGeodeMeshException::test( |
| 295 | triangulated_surface.nb_polygons() == 0, |
| 296 | "[Test]TriangulatedSurface should have 0 polygon" ); |
| 297 | geode::OpenGeodeMeshException::test( |
| 298 | triangulated_surface.polygons_around_vertex( 0 ).empty(), |
| 299 | "No more polygon around vertices" ); |
| 300 | |
| 301 | builder.delete_isolated_vertices(); |
| 302 | geode::OpenGeodeMeshException::test( |
| 303 | triangulated_surface.nb_vertices() == 0, |
| 304 | "[Test]TriangulatedSurface should have 0 vertex" ); |
| 305 | } |
| 306 | |
| 307 | void test() |
| 308 | { |
nothing calls this directly
no test coverage detected