| 591 | } |
| 592 | |
| 593 | void test_delete_all( const geode::PolyhedralSolid3D& polyhedral_solid, |
| 594 | geode::PolyhedralSolidBuilder3D& builder ) |
| 595 | { |
| 596 | std::vector< bool > to_delete( polyhedral_solid.nb_polyhedra(), true ); |
| 597 | builder.delete_polyhedra( to_delete ); |
| 598 | geode::OpenGeodeMeshException::test( polyhedral_solid.nb_vertices() == 8, |
| 599 | "PolyhedralSolid should have 8 vertices" ); |
| 600 | geode::OpenGeodeMeshException::test( |
| 601 | polyhedral_solid.is_vertex_isolated( 0 ), |
| 602 | "Vertices should be isolated after polyhedra deletion" ); |
| 603 | geode::OpenGeodeMeshException::test( polyhedral_solid.nb_polyhedra() == 0, |
| 604 | "PolyhedralSolid should have 0 polyhedron" ); |
| 605 | builder.edges_builder().delete_isolated_edges(); |
| 606 | builder.facets_builder().delete_isolated_facets(); |
| 607 | geode::OpenGeodeMeshException::test( |
| 608 | polyhedral_solid.facets().nb_facets() == 0, |
| 609 | "PolyhedralSolid should have 0 facet" ); |
| 610 | geode::OpenGeodeMeshException::test( |
| 611 | polyhedral_solid.edges().nb_edges() == 0, |
| 612 | "PolyhedralSolid should have 0 edge" ); |
| 613 | geode::OpenGeodeMeshException::test( |
| 614 | polyhedral_solid.polyhedra_around_vertex( 0 ).empty(), |
| 615 | "No more polyhedra around vertices" ); |
| 616 | |
| 617 | builder.delete_isolated_vertices(); |
| 618 | geode::OpenGeodeMeshException::test( polyhedral_solid.nb_vertices() == 0, |
| 619 | "[Test]PolyhedralSolid should have 0 vertex" ); |
| 620 | } |
| 621 | |
| 622 | void test_texture( const geode::PolyhedralSolid3D& polyhedral_solid ) |
| 623 | { |
no test coverage detected