#include "TAttBBox.h"
ClassImp(TAttBBox)
void TAttBBox::BBoxInit(Float_t infinity)
{
   
   if (fBBox == 0) fBBox = new Float_t[6];
   fBBox[0] =  infinity;   fBBox[1] = -infinity;
   fBBox[2] =  infinity;   fBBox[3] = -infinity;
   fBBox[4] =  infinity;   fBBox[5] = -infinity;
}
void TAttBBox::BBoxZero(Float_t epsilon, Float_t x, Float_t y, Float_t z)
{
   
   
   if (fBBox == 0) fBBox = new Float_t[6];
   fBBox[0] = x - epsilon;   fBBox[1] = x + epsilon;
   fBBox[2] = y - epsilon;   fBBox[3] = y + epsilon;
   fBBox[4] = z - epsilon;   fBBox[5] = z + epsilon;
}
void TAttBBox::BBoxClear()
{
   
   delete [] fBBox; fBBox = 0;
}
void TAttBBox::AssertBBoxExtents(Float_t epsilon)
{
   
   for (Int_t i=0; i<6; i+=2) {
      if (fBBox[i+1] - fBBox[i] < epsilon) {
         Float_t b  = 0.5*(fBBox[i] + fBBox[i+1]);
         fBBox[i]   = b - 0.5*epsilon;
         fBBox[i+1] = b + 0.5*epsilon;
      }
   } 
}
Last update: Thu Jan 17 08:46:32 2008
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.