7 #ifndef BALL_MATHS_BOX3_H 8 #define BALL_MATHS_BOX3_H 14 #ifndef BALL_MATHS_VECTOR3_H 91 void set(
const TBox3& box);
208 void dump(std::ostream& s = std::cout,
Size depth = 0)
const;
226 template <
typename T>
231 depth_vector_((right_vector % height_vector).normalize() * depth),
232 width_(right_vector.getLength()),
233 height_(height_vector.getLength()),
237 template <
typename T>
246 width_(right_vector.getLength()),
247 height_(height_vector.getLength()),
248 depth_(depth_vector.getLength())
251 template <
typename T>
253 :
point_((T)0, (T)0, (T)0),
263 template <
typename T>
275 template <
typename T>
287 template <
typename T>
295 template <
typename T>
308 template <
typename T>
321 template <
typename T>
330 template <
typename T>
339 template <
typename T>
348 template <
typename T>
356 template <
typename T>
364 template <
typename T>
372 template <
typename T>
379 template <
typename T>
385 template <
typename T>
392 template <
typename T>
404 template <
typename T>
408 return !(*
this == box);
411 template <
typename T>
415 return (
point_.isValid() &&
425 template <
typename T>
433 s <<
"point: " <<
point_ << std::endl;
445 s <<
"width: " <<
width_ << std::endl;
448 s <<
"height: " <<
height_ << std::endl;
451 s <<
"depth: " <<
depth_ << std::endl;
463 template <
typename T>
467 s >> point >> right >> height >> depth;
483 template <
typename T>
484 std::ostream& operator << (std::ostream& s, const TBox3<T>& box)
486 return s << box.getPoint() <<
" " 487 << box.getRightVector() <<
" " 488 << box.getHeightVector() <<
" " 489 << box.getDepthVector();
500 #endif // BALL_MATHS_BOX3_H TVector3< T > getDiagonalVector() const
void setHeightVector(const TVector3< T > &v)
Set the height vector.
const TVector3< T > & getDepthVector() const
Get the depth vector.
const TVector3< T > & getRightVector() const
Get the right vector.
TVector3< T > depth_vector_
void setWidth(T width)
Set width.
bool operator!=(const TBox3 &box) const
TVector3< T > right_vector_
T getHeight() const
Get height.
#define BALL_DUMP_HEADER(os, cl, ob)
#define BALL_DUMP_STREAM_SUFFIX(os)
T getWidth() const
Get width.
void setDepthVector(const TVector3< T > &v)
Set the depth vector.
void dump(std::ostream &s=std::cout, Size depth=0) const
void setDepth(T depth)
Set depth.
void setPoint(const TVector3< T > &point)
Set the point.
void setHeight(T height)
Set height.
#define BALL_DUMP_DEPTH(os, depth)
const TVector3< T > & getHeightVector() const
Get the height vector.
#define BALL_DUMP_STREAM_PREFIX(os)
const TBox3 & operator=(const TBox3 &box)
void set(const TBox3 &box)
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
void setRightVector(const TVector3< T > &v)
Set the right vector.
const TVector3< T > & getPoint() const
Get the point.
bool operator==(const TBox3 &box) const
TVector3< T > height_vector_
T getDepth() const
Get depth.
#define BALL_CREATE(name)