diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-02-26 04:55:07 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-02-26 04:55:07 (GMT) |
commit | f60ece786436942792216b568943daa1b0a34c04 (patch) | |
tree | 2dab0707b4c5643513db7b62727c3b660eb5745c /tests/csgtestcore.cc | |
parent | 50489c4287d5eabf636c4cc5c558f56ab210bc27 (diff) |
fix bugs for test compile
Diffstat (limited to 'tests/csgtestcore.cc')
-rw-r--r-- | tests/csgtestcore.cc | 9 |
1 files changed, 5 insertions, 4 deletions
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); |