summaryrefslogtreecommitdiff
path: root/tests/bboxhelp.cc
diff options
context:
space:
mode:
authorBrad Pitcher <bradpitcher@gmail.com>2011-11-01 18:29:29 (GMT)
committerBrad Pitcher <bradpitcher@gmail.com>2011-11-01 18:29:29 (GMT)
commit0eacddfd8148f14ee0ddfe2eb66b82774c88afbe (patch)
tree6982ea59564090ea858d12d86d3699e83887f1f9 /tests/bboxhelp.cc
parentea7e4988d44249946b620d5973b230cf1a0606ca (diff)
parente2caf3726d68ff1fef63113519049abffc0563af (diff)
merge master
Diffstat (limited to 'tests/bboxhelp.cc')
-rw-r--r--tests/bboxhelp.cc21
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;
+}
+
+
contact: Jan Huwald // Impressum