From c818969366f369da9d3edeb9605a62c8156561c3 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Fri, 5 Nov 2010 16:18:51 +0000 Subject: [PATCH] added method P to return bounding box points as in Box3 --- vcg/space/box2.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vcg/space/box2.h b/vcg/space/box2.h index 795b9367..89c85af2 100644 --- a/vcg/space/box2.h +++ b/vcg/space/box2.h @@ -68,6 +68,14 @@ public: { min = max = p; } + + Point2 P(const int & i) const + { + return Point2( + min[0]+ (i%2) * DimX(), + min[1]+ ((i / 2)%2) * DimY()); + } + // Initializing with the values inline void Set( ScalarType minx, ScalarType miny, ScalarType maxx, ScalarType maxy ) {