7#ifndef BALL_MATHS_SIMPLEBOX3_H
8#define BALL_MATHS_SIMPLEBOX3_H
14#ifndef BALL_MATHS_VECTOR3_H
70 TSimpleBox3(const T& ax, const T& ay, const T& az, const T& bx, const T& by, const T& bz);
110 void set(
const T& ax,
const T& ay,
const T& az,
const T& bx,
const T& by,
const T& bz);
138 void get(T& ax, T& ay, T& az, T& bx, T& by, T& bz)
const;
229 void dump(std::ostream& s = std::cout,
Size depth = 0)
const;
248 template <
typename T>
255 template <
typename T>
262 template <
typename T>
270 template <
typename T>
272 const T& bx,
const T& by,
const T& bz)
279 template <
typename T>
288 template <
typename T>
297 template <
typename T>
300 const T& bx,
const T& by,
const T& bz)
307 template <
typename T>
316 template <
typename T>
324 template <
typename T>
333 template <
typename T>
342 template <
typename T>
351 template <
typename T>
356 a.set((T)0, (T)0, (T)0);
357 b.set((T)0, (T)0, (T)0);
360 template <
typename T>
369 return ((width * height + width * depth + height * depth) * 2);
372 template <
typename T>
381 return (width * height * depth);
384 template <
typename T>
392 template <
typename T>
400 template <
typename T>
408 template <
typename T>
452 template <
typename T>
457 return (a == box.
a && b == box.
b);
460 template <
typename T>
465 return !(*
this == box);
468 template <
typename T>
473 return (a.isValid() && b.isValid());
476 template <
typename T>
484 for (
int i = 0; i < 3; i++)
494 for (
int i = 0; i < 3; i++)
506 for (
int i = 0; i < 3; i++)
514 return (temp && has(point,
false));
517 template <
typename T>
549 box_higher = &box.
b;;
552 for (
int i = 0; i < 3; i++)
563 template <
typename T>
572 s <<
" a: " << a << std::endl;
575 s <<
" b: " << b << std::endl;
588 template <
typename T>
593 s >>
c >> box.
a >> box.
b >>
c;
605 template <
typename T>
609 return s <<
"(" << box.
a <<
' ' << box.
b <<
')';
#define BALL_CREATE(name)
#define BALL_DUMP_STREAM_PREFIX(os)
#define BALL_DUMP_STREAM_SUFFIX(os)
#define BALL_DUMP_DEPTH(os, depth)
#define BALL_DUMP_HEADER(os, cl, ob)
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
TSimpleBox3< float > SimpleBox3
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
BALL_EXTERN_VARIABLE const double c
T max(const T &a, const T &b)
bool isLess(const T1 &a, const T2 &b)
T min(const T &a, const T &b)
bool isEqual(const T1 &a, const T2 &b)
void get(TVector3< T > &lower, TVector3< T > &upper) const
void dump(std::ostream &s=std::cout, Size depth=0) const
bool has(const TVector3< T > &point, bool on_surface=false) const
void set(const T &ax, const T &ay, const T &az, const T &bx, const T &by, const T &bz)
void set(const TVector3< T > &lower, const TVector3< T > &upper)
void swap(TSimpleBox3 &box)
bool isIntersecting(const TSimpleBox3 &box) const
bool operator==(const TSimpleBox3 &box) const
const TSimpleBox3 & operator=(const TSimpleBox3 &box)
void get(T &ax, T &ay, T &az, T &bx, T &by, T &bz) const
bool operator!=(const TSimpleBox3 &box) const
void set(const TSimpleBox3 &box)
void get(TSimpleBox3 &box) const
void join(const TSimpleBox3 &box)