From aa4cdc3701feb55da44e5dd7c69d03581e54b33a Mon Sep 17 00:00:00 2001 From: ganovelli Date: Thu, 15 Jul 2004 09:47:55 +0000 Subject: [PATCH] added function P(int i) to list the box's vertices --- vcg/space/box3.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vcg/space/box3.h b/vcg/space/box3.h index c64e1609..0f2cebc4 100644 --- a/vcg/space/box3.h +++ b/vcg/space/box3.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.6 2004/07/07 23:26:25 cignoni +removed the infamous Inflate. Now only Offset exists + Revision 1.5 2004/03/05 17:51:28 tarini Errorino "ScalarType" -> "BoxScalarType" @@ -297,7 +300,14 @@ public: { return Box3(Point3::Construct(b.min),Point3::Construct(b.max)); } - + + /// gives the ith box vertex in order: (x,y,z),(X,y,z),(x,Y,z),(X,Y,z),(x,y,Z),(X,y,Z),(x,Y,Z),(X,Y,Z) + Point3 P(const int & i){ + return Point3( + min[0]+ (i%2) * DimX(), + min[1]+ ((i / 2)%2) * DimY(), + min[2]+ (i>3)* DimZ()); + } }; // end class definition