From 4086ccd28b6b0675fd3e923ebcf0ac6d9d028006 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 30 Sep 2005 15:03:57 +0000 Subject: [PATCH] Added Center-Radius Constructor --- vcg/space/box3.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vcg/space/box3.h b/vcg/space/box3.h index 0b1658f8..5eaea150 100644 --- a/vcg/space/box3.h +++ b/vcg/space/box3.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.8 2004/07/20 23:10:01 cignoni +Uncommented Add of matrix transformed bbox + Revision 1.7 2004/07/15 09:47:55 ganovelli added function P(int i) to list the box's vertices @@ -83,6 +86,11 @@ public: inline Box3( const Box3 & b ) { min=b.min; max=b.max; } /// Min Max constructor inline Box3( const Point3 & mi, const Point3 & ma ) { min = mi; max = ma; } + /// Point Radius Constructor + inline Box3(const Point3 & center, const BoxScalarType & radius) { + min = center-Point3(radius,radius,radius); + max = center+Point3(radius,radius,radius); + } /// The bounding box distructor inline ~Box3() { } /// Operator to compare two bounding box