29 #ifndef __vtkBoundingBox_h
30 #define __vtkBoundingBox_h
42 double yMin,
double yMax,
43 double zMin,
double zMax);
61 void SetBounds(
double bounds[6]);
62 void SetBounds(
double xMin,
double xMax,
63 double yMin,
double yMax,
64 double zMin,
double zMax);
70 void SetMinPoint(
double x,
double y,
double z);
71 void SetMinPoint(
double p[3]);
77 void SetMaxPoint(
double x,
double y,
double z);
78 void SetMaxPoint(
double p[3]);
84 void AddPoint(
double p[3]);
85 void AddPoint(
double px,
double py,
double pz);
93 void AddBounds(
double bounds[6]);
110 void GetBounds(
double bounds[6])
const;
111 void GetBounds(
double &xMin,
double &xMax,
112 double &yMin,
double &yMax,
113 double &zMin,
double &zMax)
const;
117 double GetBound(
int i)
const;
121 const double *GetMinPoint()
const;
122 void GetMinPoint(
double &x,
double &y,
double &z)
const;
127 const double *GetMaxPoint()
const;
128 void GetMaxPoint(
double &x,
double &y,
double &z)
const;
133 int ContainsPoint(
double p[3])
const;
134 int ContainsPoint(
double px,
double py,
double pz)
const;
138 void GetCenter(
double center[3])
const;
141 void GetLengths(
double lengths[3])
const;
144 double GetLength(
int i)
const;
147 double GetMaxLength()
const;
150 double GetDiagonalLength()
const;
154 void Inflate(
double delta);
160 static int IsValid(
double bounds[6]);
171 void Scale(
double s[3]);
172 void Scale(
double sx,
178 double MinPnt[3], MaxPnt[3];
188 double &yMin,
double &yMax,
189 double &zMin,
double &zMax)
const
204 return ((i & 0x1) ? this->
MaxPnt[i>>1] : this->
MinPnt[i>>1]);
226 return (bounds[0] <= bounds[1] &&
227 bounds[2] <= bounds[3] &&
228 bounds[4] <= bounds[5]);
252 this->
SetBounds(bounds[0], bounds[1], bounds[2],
253 bounds[3], bounds[4], bounds[5]);
258 this->
GetBounds(bounds[0], bounds[1], bounds[2],
259 bounds[3], bounds[4], bounds[5]);
274 double yMin,
double yMax,
275 double zMin,
double zMax)
278 this->
SetBounds(xMin, xMax, yMin, yMax, zMin, zMax);
307 (this->MinPnt[1] == bbox.
MinPnt[1]) &&
308 (this->MinPnt[2] == bbox.
MinPnt[2]) &&
309 (this->MaxPnt[0] == bbox.
MaxPnt[0]) &&
310 (this->MaxPnt[1] == bbox.
MaxPnt[1]) &&
311 (this->MaxPnt[2] == bbox.
MaxPnt[2]));
316 return !((*this) == bbox);
350 if ((py < this->MinPnt[1]) || (py > this->
MaxPnt[1]))
354 if ((pz < this->MinPnt[2]) || (pz > this->
MaxPnt[2]))
void GetBounds(double bounds[6]) const
const double * GetMinPoint() const
void SetMaxPoint(double x, double y, double z)
int operator!=(const vtkBoundingBox &bbox) const
int ContainsPoint(double p[3]) const
int operator==(const vtkBoundingBox &bbox) const
void GetCenter(double center[3]) const
VTK_COMMON_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
double GetBound(int i) const
void GetLengths(double lengths[3]) const
vtkBoundingBox & operator=(const vtkBoundingBox &bbox)
void SetBounds(double bounds[6])
void SetMinPoint(double x, double y, double z)
double GetLength(int i) const
VTK_COMMON_EXPORT bool operator!=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
const double * GetMaxPoint() const
Fast Simple Class for dealing with 3D bounds.