mirror of https://github.com/vitalif/openscad
Minor note about eigen3
parent
a4fea6df86
commit
d06d0e323e
|
@ -48,12 +48,14 @@ bool matrix_contains_nan( const Transform3d &m )
|
||||||
|
|
||||||
double getBoundingRadius(BoundingBox bbox)
|
double getBoundingRadius(BoundingBox bbox)
|
||||||
{
|
{
|
||||||
|
// FIXME: For eigen3, we can use bbox.diagonal().norm()/2;
|
||||||
double radius = (bbox.max() - bbox.min()).norm() / 2;
|
double radius = (bbox.max() - bbox.min()).norm() / 2;
|
||||||
return radius; // 0;
|
return radius; // 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3d getBoundingCenter(BoundingBox bbox)
|
Vector3d getBoundingCenter(BoundingBox bbox)
|
||||||
{
|
{
|
||||||
|
// FIXME: For eigen3, we can use bbox.center();
|
||||||
Vector3d center = (bbox.min() + bbox.max()) / 2;
|
Vector3d center = (bbox.min() + bbox.max()) / 2;
|
||||||
return center; // Vector3d(0,0,0);
|
return center; // Vector3d(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue