#include <box3.h>
Public Member Functions |
|
Constructors and Destructors
|
|
TBox3 () | |
Default constructor. |
|
TBox3 (const TBox3 &box) | |
Copy constructor. |
|
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) | |
Detailed constructor. |
|
virtual | ~TBox3 () |
Destructor. |
|
virtual void | clear () |
Clear method. |
|
Assignment
|
|
void | set (const TBox3 &box) |
Assign from another instance of
TBox3. |
|
const TBox3 & | operator= (const TBox3 &box) |
Assignment operator. |
|
void | swap (TBox3 &box) |
Swap the contents of two instances.
|
|
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 |
Calculate the surface area. |
|
T | getVolume () const |
Calculate the volume. |
|
TVector3< T > | getDiagonalVector () const |
Predicates
|
|
bool | operator== (const TBox3 &box) const |
Equality operator. |
|
bool | operator!= (const TBox3 &box) const |
Inequality operator. |
|
Debugging and Diagnostics
|
|
bool | isValid () const |
Test whether instance is valid.
|
|
void | dump (std::ostream &s=std::cout, Size depth=0) const |
Internal state dump. |
|
Protected Attributes |
|
TVector3< T > | point_ |
TVector3< T > | right_vector_ |
TVector3< T > | height_vector_ |
T | width_ |
T | height_ |
T | depth_ |
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 | ( | const TBox3< T > & | box | ) |
Copy constructor.
box | the TBox3 object to be copied |
void BALL::TBox3< T >::clear | ( | ) | [virtual] |
void BALL::TBox3< T >::dump | ( | std::ostream & | s =
std::cout , |
|
Size | depth =
0 |
|||
) | const |
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.
T BALL::TBox3< T >::getSurface | ( | ) | const |
Calculate the surface area.
T BALL::TBox3< T >::getVolume | ( | ) | const |
Calculate the volume.
bool BALL::TBox3< T >::isValid | ( | ) | const |
Test whether instance is valid.
Always returns true.
Reimplemented in BALL::VIEW::Box.
bool BALL::TBox3< T >::operator!= | ( | const TBox3< T > & | box | ) | const |
Inequality operator.
const TBox3< T > & BALL::TBox3< T >::operator= | ( | const TBox3< T > & | box | ) |
bool BALL::TBox3< T >::operator== | ( | const TBox3< T > & | box | ) | const |
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 | ) |
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 >::swap | ( | TBox3< T > & | box | ) |
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_.