summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-09-01 20:43:56 (GMT)
committerMarius Kintel <marius@kintel.net>2011-09-01 20:43:56 (GMT)
commit915c530ac40c3c8b4f9021720ee594b840b1ce2b (patch)
tree03186b32dfe4145fa8c45c91a137eaeb068dbc19
parent5fee135293b7b55f5a28ab673481abeef1374a61 (diff)
Support for 2D designs
-rw-r--r--tests/cgalpngtest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc
index 2680752..a93d564 100644
--- a/tests/cgalpngtest.cc
+++ b/tests/cgalpngtest.cc
@@ -212,12 +212,15 @@ int main(int argc, char **argv)
bbox = BoundingBox(Vector3d(cgalbbox.xmin(), cgalbbox.ymin(), cgalbbox.zmin()),
Vector3d(cgalbbox.xmax(), cgalbbox.ymax(), cgalbbox.zmax()));
}
+ else if (cgalRenderer.polyset) {
+ bbox = cgalRenderer.polyset->getBoundingBox();
+ }
Vector3d center = (bbox.min() + bbox.max()) / 2;
double radius = (bbox.max() - bbox.min()).norm() / 2;
Vector3d cameradir(1, 1, -0.5);
- Vector3d camerapos = center - radius*1.5*cameradir;
+ Vector3d camerapos = center - radius*2*cameradir;
csgInfo.glview->setCamera(camerapos, center);
contact: Jan Huwald // Impressum