#include <simpleBox3.h>
Public Member Functions | |
Constructors and Destructors | |
TSimpleBox3 () throw () | |
Default constructor. | |
TSimpleBox3 (const TSimpleBox3 &box) throw () | |
Copy constructor. | |
TSimpleBox3 (const TVector3< T > &a, const TVector3< T > &b) throw () | |
Detailed constructor. | |
TSimpleBox3 (const T &ax, const T &ay, const T &az, const T &bx, const T &by, const T &bz) throw () | |
Detailed constructor. | |
virtual | ~TSimpleBox3 () throw () |
Destructor. | |
virtual void | clear () throw () |
Clear method. | |
Assignment | |
void | set (const TSimpleBox3 &box) throw () |
Assign from another instance of TSimpleBox3. | |
void | set (const TVector3< T > &lower, const TVector3< T > &upper) throw () |
Assign from two points. | |
void | set (const T &ax, const T &ay, const T &az, const T &bx, const T &by, const T &bz) throw () |
Assign from six values of type T . | |
const TSimpleBox3 & | operator= (const TSimpleBox3 &box) throw () |
Assignment operator. | |
void | get (TSimpleBox3 &box) const throw () |
Assign to another instance of TSimpleBox3. | |
void | get (TVector3< T > &lower, TVector3< T > &upper) const throw () |
Assign to two variables of type TVector3 . | |
void | get (T &ax, T &ay, T &az, T &bx, T &by, T &bz) const throw () |
Assign to six variables of type T . | |
void | swap (TSimpleBox3 &box) throw () |
Swap the contents of two instances. | |
Accessors | |
T | getSurface () const throw () |
Calculate the surface area. | |
T | getVolume () const throw () |
Calculate the volume. | |
T | getWidth () const throw () |
Return the width of the box. | |
T | getHeight () const throw () |
Return the height of the box. | |
T | getDepth () const throw () |
Return the depth of the box. | |
void | join (const TSimpleBox3 &box) throw () |
Join the box with an other. | |
Predicates | |
bool | operator== (const TSimpleBox3 &box) const throw () |
Equality operator. | |
bool | operator!= (const TSimpleBox3 &box) const throw () |
Inequality operator. | |
bool | has (const TVector3< T > &point, bool on_surface=false) const throw () |
Test if a given point is a member of the box. | |
bool | isIntersecting (const TSimpleBox3 &box) const throw () |
Test if two boxes intersect. | |
Debugging and Diagnostics | |
bool | isValid () const throw () |
Test whether instance is valid. | |
void | dump (std::ostream &s=std::cout, Size depth=0) const throw () |
Internal state dump. | |
Public Attributes | |
Public members | |
TVector3< T > | a |
First point of the box. | |
TVector3< T > | b |
Second point of the box. |
This class describes a three-dimensional box with edges parallel to the coordinate system. Hence, a box is given by the coordinates of the lower left front corner and ther upper right back corner.\
|
Default constructor. This method creates a new TSimpleBox3 object. The three components of the two TVector3 are initialized to { (T)0}. |
|
Copy constructor. Create a new TSimpleBox3 object from another.
|
|
Detailed constructor. Create a new TSimpleBox3 object from two instances of TVector3.
|
|
Detailed constructor.
Create a new TSimpleBox3 object from six variables of type
|
|
Destructor. Destructs the TSimpleBox3 object. As there are no dynamic data structures, nothing happens. |
|
Clear method. The values are set to 0. Reimplemented in VIEW::SimpleBox. |
|
Internal state dump. Dump the current internal state of {*this} to the output ostream s with dumping depth depth .
Reimplemented in VIEW::SimpleBox. |
|
Assign to six variables of type
|
|
Assign to two variables of type
|
|
Assign to another instance of TSimpleBox3. Assigns the box components to another box.
|
|
Return the depth of the box.
|
|
Return the height of the box.
|
|
Calculate the surface area.
|
|
Calculate the volume.
|
|
Return the width of the box.
|
|
Test if a given point is a member of the box. Optional it can be testet, if the point lies on the surface.
|
|
Test if two boxes intersect.
|
|
Test whether instance is valid. Always returns true.
Reimplemented in VIEW::SimpleBox. |
|
Join the box with an other. Instance is set to the box containing both, this box and a given box.
|
|
Inequality operator.
|
|
Assignment operator. Assign the box components from another instance of TSimpleBox3.
|
|
Equality operator.
|
|
Assign from six values of type
|
|
Assign from two points.
|
|
Assign from another instance of TSimpleBox3.
|
|
Swap the contents of two instances.
|
|
First point of the box.
|
|
Second point of the box.
|