summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-02-26 04:55:07 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-02-26 04:55:07 (GMT)
commitf60ece786436942792216b568943daa1b0a34c04 (patch)
tree2dab0707b4c5643513db7b62727c3b660eb5745c
parent50489c4287d5eabf636c4cc5c558f56ab210bc27 (diff)
fix bugs for test compile
-rw-r--r--src/GLView.cc3
-rw-r--r--tests/cgalpngtest.cc7
-rw-r--r--tests/csgtestcore.cc9
3 files changed, 12 insertions, 7 deletions
diff --git a/src/GLView.cc b/src/GLView.cc
index b01af98..4880c40 100644
--- a/src/GLView.cc
+++ b/src/GLView.cc
@@ -49,6 +49,9 @@ void GLView::resizeGL(int w, int h)
void GLView::setGimbalCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d &rot, double distance)
{
+ (void) pos;
+ (void) rot;
+ (void) distance;
PRINT("set gimbal camera not implemented");
}
diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc
index ac4ebdf..a3532af 100644
--- a/tests/cgalpngtest.cc
+++ b/tests/cgalpngtest.cc
@@ -156,12 +156,13 @@ int main(int argc, char **argv)
bbox = cgalRenderer.polyset->getBoundingBox();
}
- Vector3d center = getBoundingCenter(bbox);
+ VectorCamera vc;
+ vc.center = getBoundingCenter(bbox);
double radius = getBoundingRadius(bbox);
Vector3d cameradir(1, 1, -0.5);
- Vector3d camerapos = center - radius*2*cameradir;
- csgInfo.glview->setCamera(camerapos, center);
+ vc.eye = vc.center - radius*2*cameradir;
+ csgInfo.glview->setCamera(vc);
csgInfo.glview->setRenderer(&cgalRenderer);
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc
index a3a0b4d..dd83462 100644
--- a/tests/csgtestcore.cc
+++ b/tests/csgtestcore.cc
@@ -180,17 +180,18 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
}
if (sysinfo_dump) cout << info_dump(csgInfo.glview);
- Vector3d center(0,0,0);
+ VectorCamera vc;
+ vc.center << 0,0,0;
double radius = 1.0;
if (csgInfo.root_chain) {
BoundingBox bbox = csgInfo.root_chain->getBoundingBox();
- center = (bbox.min() + bbox.max()) / 2;
+ vc.center = (bbox.min() + bbox.max()) / 2;
radius = (bbox.max() - bbox.min()).norm() / 2;
}
Vector3d cameradir(1, 1, -0.5);
- Vector3d camerapos = center - radius*1.8*cameradir;
- csgInfo.glview->setCamera(camerapos, center);
+ vc.eye = vc.center - radius*1.8*cameradir;
+ csgInfo.glview->setCamera(vc);
OpenCSGRenderer opencsgRenderer(csgInfo.root_chain, csgInfo.highlights_chain, csgInfo.background_chain, csgInfo.glview->shaderinfo);
ThrownTogetherRenderer thrownTogetherRenderer(csgInfo.root_chain, csgInfo.highlights_chain, csgInfo.background_chain);
contact: Jan Huwald // Impressum