diff --git a/pandatool/src/pfmprogs/pfmFile.cxx b/pandatool/src/pfmprogs/pfmFile.cxx index 454d8c6165..32f8727905 100755 --- a/pandatool/src/pfmprogs/pfmFile.cxx +++ b/pandatool/src/pfmprogs/pfmFile.cxx @@ -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; diff --git a/pandatool/src/pfmprogs/pfmTrans.cxx b/pandatool/src/pfmprogs/pfmTrans.cxx index 096c70dfe0..8a33b424cc 100755 --- a/pandatool/src/pfmprogs/pfmTrans.cxx +++ b/pandatool/src/pfmprogs/pfmTrans.cxx @@ -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"; } }