27 #include <Inventor/SbVec3s.h> 
   28 #include <Inventor/SbVec3f.h> 
   37   SbBox3s(
short xmin, 
short ymin, 
short zmin, 
short xmax, 
short ymax, 
short zmax)
 
   38     : minpt(xmin, ymin, zmin), maxpt(xmax, ymax, zmax) { }
 
   40     : minpt(minpoint), maxpt(maxpoint) { }
 
   41   explicit SbBox3s(
const SbBox3i32 & box) { setBounds(box); }
 
   45   SbBox3s & 
setBounds(
short xmin, 
short ymin, 
short zmin, 
short xmax, 
short ymax, 
short zmax)
 
   46     { minpt.setValue(xmin, ymin, zmin); maxpt.setValue(xmax, ymax, zmax); 
return *
this; }
 
   48     { minpt = minpoint; maxpt = maxpoint; 
return *
this; }
 
   49   SbBox3s & setBounds(
const SbBox3i32 & box);
 
   53   void getBounds(
short & xmin, 
short & ymin, 
short & zmin,
 
   54                  short & xmax, 
short & ymax, 
short & zmax)
 const 
   55     { minpt.getValue(xmin, ymin, zmin); maxpt.getValue(xmax, ymax, zmax); }
 
   57     { minpoint = minpt; maxpoint = maxpt; }
 
   60   SbVec3s & getMin(
void) { 
return minpt; }
 
   62   SbVec3s & getMax(
void) { 
return maxpt; }
 
   64   void extendBy(
const SbVec3s & pt);
 
   65   void extendBy(
const SbBox3s & box);
 
   67   SbBool isEmpty(
void)
 const { 
return (maxpt[0] < minpt[0]); }
 
   68   SbBool hasVolume(
void)
 const 
   69     { 
return ((maxpt[0] > minpt[0]) && (maxpt[1] > minpt[1]) && (maxpt[2] > minpt[2])); }
 
   70   int getVolume(
void)
 const 
   71     { 
short dx = 0, dy = 0, dz = 0; getSize(dx, dy, dz); 
return (dx * dy * dz); }
 
   73   SbBool intersect(
const SbVec3s & pt) 
const;
 
   74   SbBool intersect(
const SbBox3s & box) 
const;
 
   78     { 
return SbVec3f((minpt[0]+maxpt[0])*0.5f, (minpt[1]+maxpt[1])*0.5f, (minpt[2]+maxpt[2])*0.5f); }
 
   79   void getOrigin(
short & originX, 
short & originY, 
short & originZ)
 const 
   80     { minpt.getValue(originX, originY, originZ); }
 
   81   void getSize(
short & sizeX, 
short & sizeY, 
short & sizeZ)
 const 
   82     { 
if (isEmpty()) { sizeX = sizeY = sizeZ = 0; }
 
   83       else { sizeX = maxpt[0] - minpt[0]; sizeY = maxpt[1] - minpt[1]; sizeZ = maxpt[2] - minpt[2]; } }
 
   98 #endif // !COIN_SBBOX3S_H 
The SbBox3s class is a 3 dimensional box with short integer coordinates.This box class is used by oth...
Definition: SbBox3s.h:34
The SbBox3f class is an abstraction for an axis aligned 3 dimensional box.This box abstraction class ...
Definition: SbBox3f.h:37
SbBox3s & setBounds(const SbVec3s &minpoint, const SbVec3s &maxpoint)
Definition: SbBox3s.h:47
int operator!=(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:92
int operator==(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:88
void getBounds(short &xmin, short &ymin, short &zmin, short &xmax, short &ymax, short &zmax) const 
Definition: SbBox3s.h:53
The SbVec3s class is a 3 dimensional vector with short integer coordinates.This vector class provides...
Definition: SbVec3s.h:39
SbBox3s(short xmin, short ymin, short zmin, short xmax, short ymax, short zmax)
Definition: SbBox3s.h:37
SbBox3s & setBounds(short xmin, short ymin, short zmin, short xmax, short ymax, short zmax)
Definition: SbBox3s.h:45
void getOrigin(short &originX, short &originY, short &originZ) const 
Definition: SbBox3s.h:79
void getBounds(SbVec3s &minpoint, SbVec3s &maxpoint) const 
Definition: SbBox3s.h:56
The SbVec3f class is a 3 dimensional vector with floating point coordinates.This vector class is used...
Definition: SbVec3f.h:40
const SbVec3s & getMin(void) const 
Definition: SbBox3s.h:59
void getSize(short &sizeX, short &sizeY, short &sizeZ) const 
Definition: SbBox3s.h:81
const SbVec3s & getMax(void) const 
Definition: SbBox3s.h:61
The SbBox3d class is an abstraction for an axis aligned 3 dimensional box.This box abstraction class ...
Definition: SbBox3d.h:37
SbBox3s(void)
Definition: SbBox3s.h:36
SbBox3s(const SbVec3s &minpoint, const SbVec3s &maxpoint)
Definition: SbBox3s.h:39