| 26 | |
| 27 | namespace PeriodicInflator3DHelper { |
| 28 | void create_box(const VectorF& bbox_min, const VectorF& bbox_max, |
| 29 | MatrixFr& box_vertices, MatrixIr& box_faces) { |
| 30 | box_vertices.resize(8, 3); |
| 31 | box_faces.resize(12, 3); |
| 32 | box_vertices << bbox_min[0], bbox_min[1], bbox_min[2], |
| 33 | bbox_max[0], bbox_min[1], bbox_min[2], |
| 34 | bbox_max[0], bbox_max[1], bbox_min[2], |
| 35 | bbox_min[0], bbox_max[1], bbox_min[2], |
| 36 | bbox_min[0], bbox_min[1], bbox_max[2], |
| 37 | bbox_max[0], bbox_min[1], bbox_max[2], |
| 38 | bbox_max[0], bbox_max[1], bbox_max[2], |
| 39 | bbox_min[0], bbox_max[1], bbox_max[2]; |
| 40 | box_faces << 1, 2, 5, |
| 41 | 5, 2, 6, |
| 42 | 3, 4, 7, |
| 43 | 3, 0, 4, |
| 44 | 2, 3, 6, |
| 45 | 3, 7, 6, |
| 46 | 0, 1, 5, |
| 47 | 0, 5, 4, |
| 48 | 4, 5, 6, |
| 49 | 4, 6, 7, |
| 50 | 0, 3, 2, |
| 51 | 0, 2, 1; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | using namespace PeriodicInflator3DHelper; |