| 213 | } |
| 214 | |
| 215 | void test_permutation( const geode::PolyhedralSolid3D& solid, |
| 216 | geode::PolyhedralSolidBuilder3D& builder ) |
| 217 | { |
| 218 | std::vector< geode::index_t > vertex_permutation{ 4, 2, 6, 1, 5, 0, 7, 3 }; |
| 219 | builder.permute_vertices( vertex_permutation ); |
| 220 | geode::OpenGeodeMeshException::test( |
| 221 | solid.polyhedron_vertex( { 0, 0 } ) == 5, |
| 222 | "Wrong PolyhedronVertex after vertex permute" ); |
| 223 | geode::OpenGeodeMeshException::test( |
| 224 | solid.polyhedron_vertex( { 0, 1 } ) == 3, |
| 225 | "Wrong PolyhedronVertex after vertex permute" ); |
| 226 | geode::OpenGeodeMeshException::test( |
| 227 | solid.polyhedron_vertex( { 0, 2 } ) == 1, |
| 228 | "Wrong PolyhedronVertex after vertex permute" ); |
| 229 | geode::OpenGeodeMeshException::test( |
| 230 | solid.polyhedron_vertex( { 0, 3 } ) == 7, |
| 231 | "Wrong PolyhedronVertex after vertex permute" ); |
| 232 | geode::OpenGeodeMeshException::test( |
| 233 | solid.polyhedron_vertex( { 0, 4 } ) == 0, |
| 234 | "Wrong PolyhedronVertex after vertex permute" ); |
| 235 | geode::OpenGeodeMeshException::test( |
| 236 | solid.polyhedron_vertex( { 0, 5 } ) == 4, |
| 237 | "Wrong PolyhedronVertex after vertex permute" ); |
| 238 | geode::OpenGeodeMeshException::test( |
| 239 | solid.polyhedron_vertex( { 1, 0 } ) == 7, |
| 240 | "Wrong PolyhedronVertex after vertex permute" ); |
| 241 | geode::OpenGeodeMeshException::test( |
| 242 | solid.polyhedron_vertex( { 1, 1 } ) == 0, |
| 243 | "Wrong PolyhedronVertex after vertex permute" ); |
| 244 | geode::OpenGeodeMeshException::test( |
| 245 | solid.polyhedron_vertex( { 1, 2 } ) == 4, |
| 246 | "Wrong PolyhedronVertex after vertex permute" ); |
| 247 | geode::OpenGeodeMeshException::test( |
| 248 | solid.polyhedron_vertex( { 1, 3 } ) == 2, |
| 249 | "Wrong PolyhedronVertex after vertex permute" ); |
| 250 | geode::OpenGeodeMeshException::test( |
| 251 | solid.polyhedron_vertex( { 2, 0 } ) == 0, |
| 252 | "Wrong PolyhedronVertex after vertex permute" ); |
| 253 | geode::OpenGeodeMeshException::test( |
| 254 | solid.polyhedron_vertex( { 2, 1 } ) == 4, |
| 255 | "Wrong PolyhedronVertex after vertex permute" ); |
| 256 | geode::OpenGeodeMeshException::test( |
| 257 | solid.polyhedron_vertex( { 2, 2 } ) == 2, |
| 258 | "Wrong PolyhedronVertex after vertex permute" ); |
| 259 | geode::OpenGeodeMeshException::test( |
| 260 | solid.polyhedron_vertex( { 2, 3 } ) == 6, |
| 261 | "Wrong PolyhedronVertex after vertex permute" ); |
| 262 | |
| 263 | std::vector< geode::index_t > polyhedron_permutation{ 2, 0, 1 }; |
| 264 | builder.permute_polyhedra( polyhedron_permutation ); |
| 265 | geode::OpenGeodeMeshException::test( |
| 266 | solid.polyhedron_vertex( { 0, 0 } ) == 0, |
| 267 | "Wrong PolyhedronVertex after polyhedron permute" ); |
| 268 | geode::OpenGeodeMeshException::test( |
| 269 | solid.polyhedron_vertex( { 0, 1 } ) == 4, |
| 270 | "Wrong PolyhedronVertex after polyhedron permute" ); |
| 271 | geode::OpenGeodeMeshException::test( |
| 272 | solid.polyhedron_vertex( { 0, 2 } ) == 2, |
no test coverage detected