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;
204 bool has(
const TVector3<T>& point,
bool on_surface =
false)
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>
606 std::ostream& operator << (std::ostream& s, const TSimpleBox3<T>& box)
609 return s <<
"(" << box.a <<
' ' << box.b <<
')';
619 #endif // BALL_MATHS_SimpleBox3_H
bool isIntersecting(const TSimpleBox3 &box) const
const TSimpleBox3 & operator=(const TSimpleBox3 &box)
#define BALL_CREATE(name)
bool isEqual(const T1 &a, const T2 &b)
bool operator==(const TSimpleBox3 &box) const
void join(const TSimpleBox3 &box)
void swap(TSimpleBox3 &box)
void set(const TSimpleBox3 &box)
bool has(const TVector3< T > &point, bool on_surface=false) const
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
BALL_EXTERN_VARIABLE const double c
bool operator!=(const TSimpleBox3 &box) const
#define BALL_DUMP_HEADER(os, cl, ob)
T max(const T &a, const T &b)
TSimpleBox3< float > SimpleBox3
bool isLess(const T1 &a, const T2 &b)
void get(TSimpleBox3 &box) const
void dump(std::ostream &s=std::cout, Size depth=0) const
#define BALL_DUMP_STREAM_PREFIX(os)
#define BALL_DUMP_STREAM_SUFFIX(os)
#define BALL_DUMP_DEPTH(os, depth)
T min(const T &a, const T &b)