| 132 | } |
| 133 | |
| 134 | void test_line_intersections() |
| 135 | { |
| 136 | geode::BoundingBox3D bbox; |
| 137 | bbox.add_point( geode::Point3D{ { -1, -1, -1 } } ); |
| 138 | bbox.add_point( geode::Point3D{ { 1, 1, 1 } } ); |
| 139 | |
| 140 | const geode::OwnerInfiniteLine3D line_inside{ |
| 141 | geode::Vector3D{ { 0, 0, 1 } }, geode::Point3D{ { 0, 0, 0 } } |
| 142 | }; |
| 143 | geode::OpenGeodeGeometryException::test( |
| 144 | bbox.intersects( line_inside ), "Wrong result with line_inside" ); |
| 145 | |
| 146 | const geode::OwnerInfiniteLine3D line_up{ geode::Vector3D{ { 0, 0, 1 } }, |
| 147 | geode::Point3D{ { 0, 0, 2 } } }; |
| 148 | geode::OpenGeodeGeometryException::test( |
| 149 | bbox.intersects( line_up ), "Wrong result with line_up" ); |
| 150 | |
| 151 | const geode::OwnerInfiniteLine3D line_down{ geode::Vector3D{ { 0, 0, 1 } }, |
| 152 | geode::Point3D{ { 0, 0, -2 } } }; |
| 153 | geode::OpenGeodeGeometryException::test( |
| 154 | bbox.intersects( line_down ), "Wrong result with line_down" ); |
| 155 | } |
| 156 | |
| 157 | void test_triangle2d_intersections() |
| 158 | { |
no test coverage detected