added method P to return bounding box points as in Box3

This commit is contained in:
Nico Pietroni 2010-11-05 16:18:51 +00:00
parent 343493ef11
commit c818969366
1 changed files with 8 additions and 0 deletions

View File

@ -68,6 +68,14 @@ public:
{
min = max = p;
}
Point2<BoxScalarType> P(const int & i) const
{
return Point2<BoxScalarType>(
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 )
{