#include <BALL/MATHS/box3.h>
Public Member Functions | |
Constructors and Destructors | |
TBox3 () | |
TBox3 (const TBox3 &box) | |
TBox3 (const TVector3< T > &point, const TVector3< T > &right_vector=TVector3< T >((T) 0,(T) 1,(T) 0), const TVector3< T > &height_vector=TVector3< T >((T)-1,(T) 0,(T) 0), const T &depth=1) | |
virtual | ~TBox3 () |
virtual void | clear () |
Assignment | |
void | set (const TBox3 &box) |
const TBox3 & | operator= (const TBox3 &box) |
void | swap (TBox3 &box) |
Accessors | |
void | setWidth (T width) |
Set width. | |
T | getWidth () const |
Get width. | |
void | setHeight (T height) |
Set height. | |
T | getHeight () const |
Get height. | |
void | setDepth (T depth) |
Set depth. | |
T | getDepth () const |
Get depth. | |
const TVector3< T > & | getPoint () const |
Get the point. | |
void | setPoint (const TVector3< T > &point) |
Set the point. | |
const TVector3< T > & | getRightVector () const |
Get the right vector. | |
void | setRightVector (const TVector3< T > &v) |
Set the right vector. | |
const TVector3< T > & | getHeightVector () const |
Get the height vector. | |
void | setHeightVector (const TVector3< T > &v) |
Set the height vector. | |
T | getSurface () const |
T | getVolume () const |
TVector3< T > | getDiagonalVector () const |
Predicates | |
bool | operator== (const TBox3 &box) const |
bool | operator!= (const TBox3 &box) const |
Debugging and Diagnostics | |
bool | isValid () const |
void | dump (std::ostream &s=std::cout, Size depth=0) const |
Protected Attributes | |
TVector3< T > | point_ |
TVector3< T > | right_vector_ |
TVector3< T > | height_vector_ |
T | width_ |
T | height_ |
T | depth_ |
Generic three-dimensional Box. This class describes a three-dimensional box. A box is given by the coordinates of the lower left front corner, width, height, depth and the right vector.\
BALL::TBox3< T >::TBox3 | ( | ) | [inline] |
Default constructor.
BALL::TBox3< T >::TBox3 | ( | const TBox3< T > & | box | ) | [inline] |
Copy constructor.
box | the TBox3 object to be copied |
BALL::TBox3< T >::TBox3 | ( | const TVector3< T > & | point, | |
const TVector3< T > & | right_vector = TVector3<T>((T) 0, (T)1, (T)0) , |
|||
const TVector3< T > & | height_vector = TVector3<T>((T)-1, (T)0, (T)0) , |
|||
const T & | depth = 1 | |||
) | [inline] |
Detailed constructor.
virtual BALL::TBox3< T >::~TBox3 | ( | ) | [inline, virtual] |
Destructor.
void BALL::TBox3< T >::clear | ( | ) | [inline, virtual] |
Clear method. The values are set to 0.
Reimplemented in BALL::VIEW::Box.
References BALL::TBox3< T >::depth_, BALL::TBox3< T >::height_, BALL::TBox3< T >::height_vector_, BALL::TBox3< T >::point_, BALL::TBox3< T >::right_vector_, and BALL::TBox3< T >::width_.
void BALL::TBox3< T >::dump | ( | std::ostream & | s = std::cout , |
|
Size | depth = 0 | |||
) | const [inline] |
Internal state dump. Dump the current internal state of {*this} to the output ostream s with dumping depth depth .
s | - output stream where to output the internal state of {*this} | |
depth | - the dumping depth |
Reimplemented in BALL::VIEW::Box.
References BALL_DUMP_DEPTH, BALL_DUMP_HEADER, BALL_DUMP_STREAM_PREFIX, BALL_DUMP_STREAM_SUFFIX, BALL::TBox3< T >::depth_, BALL::TBox3< T >::height_, BALL::TBox3< T >::height_vector_, BALL::TBox3< T >::point_, BALL::TBox3< T >::right_vector_, and BALL::TBox3< T >::width_.
T BALL::TBox3< T >::getDepth | ( | ) | const [inline] |
Get depth.
TVector3< T > BALL::TBox3< T >::getDiagonalVector | ( | ) | const [inline] |
T BALL::TBox3< T >::getHeight | ( | ) | const [inline] |
Get height.
const TVector3<T>& BALL::TBox3< T >::getHeightVector | ( | ) | const [inline] |
Get the height vector.
const TVector3<T>& BALL::TBox3< T >::getPoint | ( | ) | const [inline] |
Get the point.
const TVector3<T>& BALL::TBox3< T >::getRightVector | ( | ) | const [inline] |
Get the right vector.
BALL_INLINE T BALL::TBox3< T >::getSurface | ( | ) | const [inline] |
Calculate the surface area.
References BALL::TBox3< T >::depth_, BALL::TBox3< T >::height_, and BALL::TBox3< T >::width_.
BALL_INLINE T BALL::TBox3< T >::getVolume | ( | ) | const [inline] |
Calculate the volume.
References BALL::TBox3< T >::depth_, BALL::TBox3< T >::height_, and BALL::TBox3< T >::width_.
T BALL::TBox3< T >::getWidth | ( | ) | const [inline] |
Get width.
BALL_INLINE bool BALL::TBox3< T >::isValid | ( | ) | const [inline] |
Test whether instance is valid. Always returns true.
Reimplemented in BALL::VIEW::Box.
References BALL::TBox3< T >::height_vector_, BALL::TBox3< T >::point_, and BALL::TBox3< T >::right_vector_.
BALL_INLINE bool BALL::TBox3< T >::operator!= | ( | const TBox3< T > & | box | ) | const [inline] |
Inequality operator.
BALL_INLINE const TBox3< T > & BALL::TBox3< T >::operator= | ( | const TBox3< T > & | box | ) | [inline] |
bool BALL::TBox3< T >::operator== | ( | const TBox3< T > & | box | ) | const [inline] |
Equality operator.
References BALL::TBox3< T >::depth_, BALL::TBox3< T >::height_, BALL::TBox3< T >::height_vector_, BALL::TBox3< T >::point_, BALL::TBox3< T >::right_vector_, and BALL::TBox3< T >::width_.
void BALL::TBox3< T >::set | ( | const TBox3< T > & | box | ) | [inline] |
Assign from another instance of TBox3.
box | the TBox3 object to assign from |
References BALL::TBox3< T >::depth_, BALL::TBox3< T >::height_, BALL::TBox3< T >::height_vector_, BALL::TBox3< T >::point_, BALL::TBox3< T >::right_vector_, and BALL::TBox3< T >::width_.
void BALL::TBox3< T >::setDepth | ( | T | depth | ) | [inline] |
Set depth.
Referenced by BALL::operator>>().
BALL_INLINE void BALL::TBox3< T >::setHeight | ( | T | height | ) | [inline] |
Set height.
References BALL::TBox3< T >::height_, and BALL::TBox3< T >::height_vector_.
BALL_INLINE void BALL::TBox3< T >::setHeightVector | ( | const TVector3< T > & | v | ) | [inline] |
Set the height vector.
References BALL::TBox3< T >::height_, and BALL::TBox3< T >::height_vector_.
Referenced by BALL::operator>>().
void BALL::TBox3< T >::setPoint | ( | const TVector3< T > & | point | ) | [inline] |
Set the point.
Referenced by BALL::operator>>().
BALL_INLINE void BALL::TBox3< T >::setRightVector | ( | const TVector3< T > & | v | ) | [inline] |
Set the right vector.
References BALL::TBox3< T >::right_vector_, and BALL::TBox3< T >::width_.
Referenced by BALL::operator>>().
BALL_INLINE void BALL::TBox3< T >::setWidth | ( | T | width | ) | [inline] |
Set width.
References BALL::TBox3< T >::right_vector_, and BALL::TBox3< T >::width_.
void BALL::TBox3< T >::swap | ( | TBox3< T > & | box | ) | [inline] |
Swap the contents of two instances.
box | the box to swap contents with |
References BALL::TBox3< T >::depth_, BALL::TBox3< T >::height_, BALL::TBox3< T >::height_vector_, BALL::TBox3< T >::point_, BALL::TBox3< T >::right_vector_, and BALL::TBox3< T >::width_.
T BALL::TBox3< T >::depth_ [protected] |
Referenced by BALL::TBox3< T >::clear(), BALL::TBox3< T >::dump(), BALL::TBox3< float >::getDepth(), BALL::TBox3< T >::getDiagonalVector(), BALL::TBox3< T >::getSurface(), BALL::TBox3< T >::getVolume(), BALL::TBox3< T >::operator==(), BALL::TBox3< T >::set(), BALL::TBox3< float >::setDepth(), and BALL::TBox3< T >::swap().
T BALL::TBox3< T >::height_ [protected] |
Referenced by BALL::TBox3< T >::clear(), BALL::TBox3< T >::dump(), BALL::TBox3< float >::getHeight(), BALL::TBox3< T >::getSurface(), BALL::TBox3< T >::getVolume(), BALL::TBox3< T >::operator==(), BALL::TBox3< T >::set(), BALL::TBox3< T >::setHeight(), BALL::TBox3< T >::setHeightVector(), and BALL::TBox3< T >::swap().
TVector3<T> BALL::TBox3< T >::height_vector_ [protected] |
Referenced by BALL::TBox3< T >::clear(), BALL::TBox3< T >::dump(), BALL::TBox3< T >::getDiagonalVector(), BALL::TBox3< float >::getHeightVector(), BALL::TBox3< T >::isValid(), BALL::TBox3< T >::operator==(), BALL::TBox3< T >::set(), BALL::TBox3< T >::setHeight(), BALL::TBox3< T >::setHeightVector(), and BALL::TBox3< T >::swap().
TVector3<T> BALL::TBox3< T >::point_ [protected] |
TVector3<T> BALL::TBox3< T >::right_vector_ [protected] |
Referenced by BALL::TBox3< T >::clear(), BALL::TBox3< T >::dump(), BALL::TBox3< T >::getDiagonalVector(), BALL::TBox3< float >::getRightVector(), BALL::TBox3< T >::isValid(), BALL::TBox3< T >::operator==(), BALL::TBox3< T >::set(), BALL::TBox3< T >::setRightVector(), BALL::TBox3< T >::setWidth(), and BALL::TBox3< T >::swap().
T BALL::TBox3< T >::width_ [protected] |
Referenced by BALL::TBox3< T >::clear(), BALL::TBox3< T >::dump(), BALL::TBox3< T >::getSurface(), BALL::TBox3< T >::getVolume(), BALL::TBox3< float >::getWidth(), BALL::TBox3< T >::operator==(), BALL::TBox3< T >::set(), BALL::TBox3< T >::setRightVector(), BALL::TBox3< T >::setWidth(), and BALL::TBox3< T >::swap().