| 30 | Vector<PlaneF> planes; |
| 31 | |
| 32 | virtual void SetUp() |
| 33 | { |
| 34 | // Build planes for a unit cube centered at the origin. |
| 35 | // Note that the normals must be facing inwards. |
| 36 | planes.push_back(PlaneF(Point3F(-0.5f, 0.f, 0.f ), Point3F( 1.f, 0.f, 0.f))); |
| 37 | planes.push_back(PlaneF(Point3F( 0.5f, 0.f, 0.f ), Point3F(-1.f, 0.f, 0.f))); |
| 38 | planes.push_back(PlaneF(Point3F( 0.f, -0.5f, 0.f ), Point3F( 0.f, 1.f, 0.f))); |
| 39 | planes.push_back(PlaneF(Point3F( 0.f, 0.5f, 0.f ), Point3F( 0.f, -1.f, 0.f))); |
| 40 | planes.push_back(PlaneF(Point3F( 0.f, 0.f, -0.5f), Point3F( 0.f, 0.f, 1.f))); |
| 41 | planes.push_back(PlaneF(Point3F( 0.f, 0.f, 0.5f), Point3F( 0.f, 0.f, -1.f))); |
| 42 | } |
| 43 | }; |
| 44 | |
| 45 | TEST_FIX(Polyhedron, BuildFromPlanes) |