MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / test_create_vertices

Function test_create_vertices

tests/mesh/test-polyhedral-solid.cpp:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41#include <geode/tests/common.hpp>
42
43void test_create_vertices( const geode::PolyhedralSolid3D& polyhedral_solid,
44 geode::PolyhedralSolidBuilder3D& builder )
45{
46 builder.create_point( geode::Point3D{ { 0.1, 0.2, 0.3 } } );
47 builder.create_point( geode::Point3D{ { 2.1, 9.4, 6.7 } } );
48 builder.create_point( geode::Point3D{ { 7.5, 5.2, 6.3 } } );
49 builder.create_point( geode::Point3D{ { 8.1, 1.4, 4.7 } } );
50 builder.create_point( geode::Point3D{ { 4.7, 2.1, 1.3 } } );
51 builder.create_point( geode::Point3D{ { 9.3, 5.3, 6.7 } } );
52 builder.create_point( geode::Point3D{ { 7.5, 4.2, 2.8 } } );
53 builder.create_point( geode::Point3D{ { 2.2, 3.3, 4.4 } } );
54 geode::OpenGeodeMeshException::test(
55 polyhedral_solid.is_vertex_isolated( 0 ),
56 "Vertices should be isolated before polyhedra creation" );
57 geode::OpenGeodeMeshException::test( polyhedral_solid.nb_vertices() == 8,
58 "PolyhedralSolid should have 8 vertices" );
59}
60
61void test_bounding_box( const geode::PolyhedralSolid3D& polyhedral_solid )
62{

Callers 1

testFunction · 0.70

Calls 4

testFunction · 0.70
create_pointMethod · 0.45
is_vertex_isolatedMethod · 0.45
nb_verticesMethod · 0.45

Tested by

no test coverage detected