fix bizarre win32 syntax error with eigen alignedbox

stl_dim
don bright 2011-10-15 16:44:52 -05:00
parent 8e844bf76c
commit 684b9eceb7
1 changed files with 21 additions and 0 deletions

21
tests/bboxhelp.cc Normal file
View File

@ -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;
}