diff options
author | Marius Kintel <marius@kintel.net> | 2011-10-30 01:47:21 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-10-30 01:47:21 (GMT) |
commit | f64dc11d330a50c901facfd1cf5e22b2ca2d5ead (patch) | |
tree | 534b55591fc02c7776a1355a609bc979e210c5a8 /tests/bboxhelp.cc | |
parent | 9c95cd4c52d649f77169a7481669a5d384968ead (diff) | |
parent | 56979129695ca12ae86bc9b3ea988f7a720d4c8a (diff) |
Merge branch 'visitortests'
Diffstat (limited to 'tests/bboxhelp.cc')
-rw-r--r-- | tests/bboxhelp.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/bboxhelp.cc b/tests/bboxhelp.cc new file mode 100644 index 0000000..b70ddcf --- /dev/null +++ b/tests/bboxhelp.cc @@ -0,0 +1,21 @@ +/* + Work around bugs in MSVC compiler with Eigen AlignmentBox + bbox.min and bbox.max will fail with Syntax Errors if placed inside + of cgalpngtest.cc +*/ + +#include "linalg.h" + +Vector3d getBoundingCenter(BoundingBox bbox) +{ + Vector3d center = (bbox.min() + bbox.max()) / 2; + return center; // Vector3d(0,0,0); +} + +double getBoundingRadius(BoundingBox bbox) +{ + double radius = (bbox.max() - bbox.min()).norm() / 2; + return radius; // 0; +} + + |