27 #include <Inventor/SbVec3s.h> 28 #include <Inventor/SbVec3f.h> 37 SbBox3s(
short xmin,
short ymin,
short zmin,
short xmax,
short ymax,
short zmax);
44 void setBounds(
short xmin,
short ymin,
short zmin,
short xmax,
short ymax,
short zmax);
50 const SbVec3s & getMin(
void)
const;
52 const SbVec3s & getMax(
void)
const;
55 void extendBy(
const SbVec3s & point);
56 void extendBy(
const SbBox3s & box);
58 SbBool
isEmpty(
void)
const {
return (maxpt[0] < minpt[0]); }
60 {
return ((maxpt[0] > minpt[0]) && (maxpt[1] > minpt[1]) && (maxpt[2] > minpt[2])); }
62 {
short dx = 0, dy = 0, dz = 0; getSize(dx, dy, dz);
return (dx * dy * dz); }
64 SbBool intersect(
const SbVec3s & point)
const;
65 SbBool intersect(
const SbBox3s & box)
const;
66 void getBounds(
short & xmin,
short & ymin,
67 short & zmin,
short & xmax,
68 short & ymax,
short & zmax)
const;
72 {
return SbVec3f((minpt[0]+maxpt[0])*0.5f, (minpt[1]+maxpt[1])*0.5f, (minpt[2]+maxpt[2])*0.5f); }
73 void getOrigin(
short & originX,
short & originY,
short & originZ)
const;
74 void getSize(
short & sizeX,
short & sizeY,
short & sizeZ)
const;
76 friend COIN_DLL_API
int operator ==(
const SbBox3s & b1,
const SbBox3s & b2);
77 friend COIN_DLL_API
int operator !=(
const SbBox3s & b1,
const SbBox3s & b2);
82 short width(
void)
const;
83 short height(
void)
const;
84 short depth(
void)
const;
85 SbBool hasArea(
void)
const;
88 COIN_DLL_API
int operator ==(
const SbBox3s & b1,
const SbBox3s & b2);
89 COIN_DLL_API
int operator !=(
const SbBox3s & b1,
const SbBox3s & b2);
91 #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
SbVec3s & getMax(void)
Definition: SbBox3s.h:53
The SbVec3s class is a 3 dimensional vector with short integer coordinates.
Definition: SbVec3s.h:36
SbBool isEmpty(void) const
Definition: SbBox3s.h:58
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition: SbVec3f.h:37
SbBox3s(const SbBox3f &box)
Definition: SbBox3s.h:40
SbBox3s(const SbBox3i32 &box)
Definition: SbBox3s.h:39
The SbBox3d class is an abstraction for an axis aligned 3 dimensional box.This box abstraction class ...
Definition: SbBox3d.h:37
Definition: SbBox3i32.h:35
SbVec3s & getMin(void)
Definition: SbBox3s.h:51
int getVolume(void) const
Definition: SbBox3s.h:61
SbBool hasVolume(void) const
Definition: SbBox3s.h:59
SbVec3f getCenter(void) const
Definition: SbBox3s.h:71
SbBox3s(const SbBox3d &box)
Definition: SbBox3s.h:41