more work
This commit is contained in:
parent
defc9bf266
commit
a206fcfb8a
|
|
@ -392,9 +392,6 @@ compute_planar_bounds(double point_dist, double sample_radius) const {
|
|||
|
||||
normal.normalize();
|
||||
|
||||
cerr << "p0 = " << p0 << "\np1 = " << p1 << "\np2 = " << p2
|
||||
<< "\nnormal = " << normal << "\n";
|
||||
|
||||
// Compute the transform necessary to rotate all of the points into
|
||||
// the Y = 0 plane.
|
||||
LMatrix4f rotate;
|
||||
|
|
|
|||
|
|
@ -177,8 +177,17 @@ process_pfm(const Filename &input_filename, PfmFile &file) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// This is the order expected by our existing bba system.
|
||||
static const int ri = 0;
|
||||
static const int reorder_points[][8] = {
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7 }, // unfiltered
|
||||
{ 7, 5, 1, 3, 6, 4, 0, 2 }, // front, floor
|
||||
{ 4, 6, 2, 0, 5, 7, 3, 1 }, // left
|
||||
{ 7, 5, 1, 3, 2, 0, 4, 6 }, // right
|
||||
};
|
||||
|
||||
for (int i = 0; i < bounds->get_num_points(); ++i) {
|
||||
LPoint3f p = bounds->get_point(i);
|
||||
LPoint3f p = bounds->get_point(reorder_points[ri][i]);
|
||||
out << p[0] << "," << p[1] << "," << p[2] << "\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue