From 2c2b5b131956807093e3f6a6ed9cc7041b2945ca Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Fri, 1 Aug 2014 00:15:51 +0000 Subject: [PATCH] added constructor with center and radius --- vcg/space/box2.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vcg/space/box2.h b/vcg/space/box2.h index 32b5f816..d52d432e 100644 --- a/vcg/space/box2.h +++ b/vcg/space/box2.h @@ -59,6 +59,12 @@ public: inline Box2( const Box2 & b ) { min=b.min; max=b.max; } /// Min Max constructor inline Box2( const Point2 & mi, const Point2 & ma ) { min = mi; max = ma; } + + inline Box2(const Point2 & center, const BoxScalarType & radius) { + min = center-Point2(radius,radius); + max = center+Point2(radius,radius); + } + /// Distructor inline ~Box2() { } /// Operator to compare two bounding box