| 110 | } |
| 111 | |
| 112 | void test_ray_intersections() |
| 113 | { |
| 114 | geode::BoundingBox3D bbox; |
| 115 | bbox.add_point( geode::Point3D{ { -1, -1, -1 } } ); |
| 116 | bbox.add_point( geode::Point3D{ { 1, 1, 1 } } ); |
| 117 | |
| 118 | const geode::OwnerRay3D ray_inside{ geode::Vector3D{ { 0, 0, 1 } }, |
| 119 | geode::Point3D{ { 0, 0, 0 } } }; |
| 120 | geode::OpenGeodeGeometryException::test( |
| 121 | bbox.intersects( ray_inside ), "Wrong result with ray_inside" ); |
| 122 | |
| 123 | const geode::OwnerRay3D ray_up{ geode::Vector3D{ { 0, 0, 1 } }, |
| 124 | geode::Point3D{ { 0, 0, 2 } } }; |
| 125 | geode::OpenGeodeGeometryException::test( |
| 126 | !bbox.intersects( ray_up ), "Wrong result with ray_up" ); |
| 127 | |
| 128 | const geode::OwnerRay3D ray_down{ geode::Vector3D{ { 0, 0, 1 } }, |
| 129 | geode::Point3D{ { 0, 0, -2 } } }; |
| 130 | geode::OpenGeodeGeometryException::test( |
| 131 | bbox.intersects( ray_down ), "Wrong result with ray_down" ); |
| 132 | } |
| 133 | |
| 134 | void test_line_intersections() |
| 135 | { |
no test coverage detected