| 507 | } |
| 508 | |
| 509 | void test_point_side_to_triangle() |
| 510 | { |
| 511 | const geode::Point3D a{ { 0.0, 0.0, 0.0 } }; |
| 512 | const geode::Point3D b{ { 1.0, 0.0, 0.0 } }; |
| 513 | const geode::Point3D c{ { 1.0, 1.0, 0.0 } }; |
| 514 | const geode::Triangle3D triangle3D{ a, b, c }; |
| 515 | |
| 516 | const geode::Point3D q1{ { 0, 0, 1.0 } }; |
| 517 | const auto side_q1 = geode::point_side_to_triangle( q1, triangle3D ); |
| 518 | geode::OpenGeodeGeometryException::test( side_q1 == geode::SIDE::positive, |
| 519 | "Wrong result for point_side_to_triangle with query point " |
| 520 | "q1" ); |
| 521 | |
| 522 | const geode::Point3D q2{ { 0, 0, -6.0 } }; |
| 523 | const auto side_q2 = geode::point_side_to_triangle( q2, triangle3D ); |
| 524 | geode::OpenGeodeGeometryException::test( side_q2 == geode::SIDE::negative, |
| 525 | "Wrong result for point_side_to_triangle with query point " |
| 526 | "q2" ); |
| 527 | |
| 528 | const geode::Point3D q3{ { -2.0, 4.0, 0.0 } }; |
| 529 | const auto side_q3 = geode::point_side_to_triangle( q3, triangle3D ); |
| 530 | geode::OpenGeodeGeometryException::test( side_q3 == geode::SIDE::zero, |
| 531 | "Wrong result for point_side_to_triangle with query point " |
| 532 | "q3" ); |
| 533 | } |
| 534 | |
| 535 | void test() |
| 536 | { |
no test coverage detected