| 56 | } |
| 57 | |
| 58 | void GeometryCorrectionTable::apply_correction(const Vector3F& dir, MatrixFr& loop) { |
| 59 | Float edge_len = dir.norm(); |
| 60 | assert(edge_len > 1e-12); |
| 61 | Vector3F edge_dir = dir.normalized(); |
| 62 | if (fabs(edge_dir[2]) < 1e-3) { |
| 63 | apply_correction_to_in_plane_edge(edge_dir, loop); |
| 64 | } else { |
| 65 | apply_correction_to_out_plane_edge(edge_dir, loop); |
| 66 | } |
| 67 | apply_z_correction(edge_dir, loop); |
| 68 | } |
| 69 | |
| 70 | void GeometryCorrectionTable::apply_correction_to_in_plane_edge( |
| 71 | const Vector3F& edge_dir, MatrixFr& loop) { |