[optimize the update of the bounding box when transforming (rot and mirror)
Andreas Röver <roever@users.sourceforge.net>**20050618130310] {
hunk ./src/lib/voxel.cpp 35
-voxel_c::voxel_c(unsigned int x, unsigned int y, unsigned int z, voxel_type init) : sx(x), sy(y), sz(z), voxels(x*y*z) {
+voxel_c::voxel_c(unsigned int x, unsigned int y, unsigned int z, voxel_type init) : sx(x), sy(y), sz(z), voxels(x*y*z), outside(0) {
hunk ./src/lib/voxel.cpp 52
-  transform(transformation);
+  bx1 = orig.bx1;
+  bx2 = orig.bx2;
+  by1 = orig.by1;
+  by2 = orig.by2;
+  bz1 = orig.bz1;
+  bz2 = orig.bz2;
hunk ./src/lib/voxel.cpp 59
-  recalcBoundingBox();
+  outside = orig.outside;
+
+  transform(transformation);
hunk ./src/lib/voxel.cpp 71
-  transform(transformation);
+  bx1 = orig->bx1;
+  bx2 = orig->bx2;
+  by1 = orig->by1;
+  by2 = orig->by2;
+  bz1 = orig->bz1;
+  bz2 = orig->bz2;
hunk ./src/lib/voxel.cpp 78
-  recalcBoundingBox();
+  outside = orig->outside;
+
+  transform(transformation);
hunk ./src/lib/voxel.cpp 137
-  // FIXME: optimize
-  recalcBoundingBox();
+
+  unsigned int t = by1;
+
+  by1 = sz - 1 - bz2;
+  bz2 = by2;
+  by2 = sz - 1 - bz1;
+  bz1 = t;
hunk ./src/lib/voxel.cpp 161
-  // FIXME: optimize
-  recalcBoundingBox();
+
+  unsigned int t = bx1;
+
+  bx1 = sz - 1 - bz2;
+  bz2 = bx2;
+  bx2 = sz - 1 - bz1;
+  bz1 = t;
hunk ./src/lib/voxel.cpp 186
-  // FIXME: optimize
-  recalcBoundingBox();
+  unsigned int t = by1;
+
+  by1 = bx1;
+  bx1 = sy - 1 - by2;
+  by2 = bx2;
+  bx2 = sy - 1 - t;
hunk ./src/lib/voxel.cpp 239
-    // FIXME: optimize
hunk ./src/lib/voxel.cpp 264
-  // FIXME: optimize
hunk ./src/lib/voxel.cpp 292
-  // FIXME: optimize
-  recalcBoundingBox();
+
+  unsigned int t = bx1;
+
+  bx1 = sx - 1 - bx2;
+  bx2 = sx - 1 - t;
hunk ./src/lib/voxel.cpp 307
-  // FIXME: optimize
-  recalcBoundingBox();
+
+  unsigned int t = by1;
+
+  by1 = sy - 1 - by2;
+  by2 = sy - 1 - t;
hunk ./src/lib/voxel.cpp 322
-  // FIXME: optimize
-  recalcBoundingBox();
+
+  unsigned int t = bz1;
+
+  bz1 = sz - 1 - bz2;
+  bz2 = sz - 1 - t;
hunk ./src/lib/voxel.cpp 343
-  // FIXME: optimize
-  recalcBoundingBox();
+
+  if (dx + bx1 <= 0) bx1 = 0; else if (dx + bx1 >= sx) bx1 = sx-1; else bx1 += dx;
+  if (dy + by1 <= 0) by1 = 0; else if (dy + by1 >= sy) by1 = sy-1; else by1 += dy;
+  if (dz + bz1 <= 0) bz1 = 0; else if (dz + bz1 >= sz) bz1 = sz-1; else bz1 += dz;
hunk ./src/lib/voxel.cpp 717
+  recalcBoundingBox();
hunk ./src/lib/voxel.cpp 877
+  recalcBoundingBox();
hunk ./src/lib/voxel.h 114
+protected:
+
}
