BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Protected Attributes | List of all members
BALL::TBox3< T > Class Template Reference

#include <BALL/MATHS/box3.h>

Inheritance diagram for BALL::TBox3< T >:
BALL::VIEW::Box

Public Member Functions

Constructors and Destructors
 TBox3 ()
 
 TBox3 (const TBox3 &box)
 
 TBox3 (const TVector3< T > &point, const TVector3< T > &right_vector, const TVector3< T > &height_vector, const T &depth=1)
 
 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 TVector3< T > &depth_vector=TVector3< T >((T) 0,(T) 0,(T) 1))
 
virtual ~TBox3 ()
 
virtual void clear ()
 
Assignment
void set (const TBox3 &box)
 
const TBox3operator= (const TBox3 &box)
 
void swap (TBox3 &box)
 
Accessors
void setWidth (T width)
 Set width. More...
 
getWidth () const
 Get width. More...
 
void setHeight (T height)
 Set height. More...
 
getHeight () const
 Get height. More...
 
void setDepth (T depth)
 Set depth. More...
 
getDepth () const
 Get depth. More...
 
const TVector3< T > & getPoint () const
 Get the point. More...
 
void setPoint (const TVector3< T > &point)
 Set the point. More...
 
const TVector3< T > & getRightVector () const
 Get the right vector. More...
 
void setRightVector (const TVector3< T > &v)
 Set the right vector. More...
 
const TVector3< T > & getHeightVector () const
 Get the height vector. More...
 
void setHeightVector (const TVector3< T > &v)
 Set the height vector. More...
 
const TVector3< T > & getDepthVector () const
 Get the depth vector. More...
 
void setDepthVector (const TVector3< T > &v)
 Set the depth vector. More...
 
getSurface () const
 
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_
 
TVector3< T > depth_vector_
 
width_
 
height_
 
depth_
 

Detailed Description

template<typename T>
class BALL::TBox3< T >

Generic three-dimensional Box. This class describes a three-dimensional box. A box is given by the coordinates of the lower left front corner, a right vector, a height vector and a depth vector.\

Definition at line 32 of file box3.h.

Constructor & Destructor Documentation

template<typename T >
BALL::TBox3< T >::TBox3 ( )

Default constructor.

Definition at line 252 of file box3.h.

template<typename T >
BALL::TBox3< T >::TBox3 ( const TBox3< T > &  box)

Copy constructor.

Parameters
boxthe TBox3 object to be copied

Definition at line 264 of file box3.h.

template<typename T >
BALL::TBox3< T >::TBox3 ( const TVector3< T > &  point,
const TVector3< T > &  right_vector,
const TVector3< T > &  height_vector,
const T &  depth = 1 
)

Detailed constructor.

Parameters
pointthe lower left corner of the box
right_vectorthe right vector of the box
heigth_vectorthe height vector of the box
depththe depth of the box

Definition at line 227 of file box3.h.

template<typename T >
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 TVector3< T > &  depth_vector = TVector3<T>((T) 0, (T)0, (T)1) 
)

Detailed constructor.

Parameters
pointthe lower left corner of the box
right_vectorthe right vector of the box
heigth_vectorthe height vector of the box
depth_vectorthe depth vector of the box

Definition at line 238 of file box3.h.

template<typename T>
virtual BALL::TBox3< T >::~TBox3 ( )
inlinevirtual

Destructor.

Definition at line 75 of file box3.h.

Member Function Documentation

template<typename T >
void BALL::TBox3< T >::clear ( )
virtual

Clear method. The values are set to 0.

Reimplemented in BALL::VIEW::Box.

Definition at line 309 of file box3.h.

template<typename T >
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 .

Parameters
s- output stream where to output the internal state of {*this}
depth- the dumping depth

Definition at line 426 of file box3.h.

template<typename T>
T BALL::TBox3< T >::getDepth ( ) const
inline

Get depth.

Definition at line 124 of file box3.h.

template<typename T>
const TVector3<T>& BALL::TBox3< T >::getDepthVector ( ) const
inline

Get the depth vector.

Definition at line 145 of file box3.h.

template<typename T >
TVector3< T > BALL::TBox3< T >::getDiagonalVector ( ) const

Definition at line 380 of file box3.h.

template<typename T>
T BALL::TBox3< T >::getHeight ( ) const
inline

Get height.

Definition at line 118 of file box3.h.

template<typename T>
const TVector3<T>& BALL::TBox3< T >::getHeightVector ( ) const
inline

Get the height vector.

Definition at line 139 of file box3.h.

template<typename T>
const TVector3<T>& BALL::TBox3< T >::getPoint ( ) const
inline

Get the point.

Definition at line 127 of file box3.h.

template<typename T>
const TVector3<T>& BALL::TBox3< T >::getRightVector ( ) const
inline

Get the right vector.

Definition at line 133 of file box3.h.

template<typename T >
BALL_INLINE T BALL::TBox3< T >::getSurface ( ) const

Calculate the surface area.

Returns
T the surface

Definition at line 374 of file box3.h.

template<typename T >
BALL_INLINE T BALL::TBox3< T >::getVolume ( ) const

Calculate the volume.

Returns
T the volume

Definition at line 387 of file box3.h.

template<typename T>
T BALL::TBox3< T >::getWidth ( ) const
inline

Get width.

Definition at line 112 of file box3.h.

template<typename T >
BALL_INLINE bool BALL::TBox3< T >::isValid ( ) const

Test whether instance is valid. Always returns true.

Returns
bool true

Definition at line 413 of file box3.h.

template<typename T >
BALL_INLINE bool BALL::TBox3< T >::operator!= ( const TBox3< T > &  box) const

Inequality operator.

Returns
bool, true if the two boxes differ in at least one component, false otherwise

Definition at line 406 of file box3.h.

template<typename T >
BALL_INLINE const TBox3< T > & BALL::TBox3< T >::operator= ( const TBox3< T > &  box)

Assignment operator. Assign the box components from another instance of TBox3.

Parameters
boxthe TBox3 to assign from

Definition at line 289 of file box3.h.

template<typename T >
bool BALL::TBox3< T >::operator== ( const TBox3< T > &  box) const

Equality operator.

Returns
bool, true if all box components are equal, false otherwise

Definition at line 393 of file box3.h.

template<typename T >
void BALL::TBox3< T >::set ( const TBox3< T > &  box)

Assign from another instance of TBox3.

Parameters
boxthe TBox3 object to assign from

Definition at line 276 of file box3.h.

template<typename T >
BALL_INLINE void BALL::TBox3< T >::setDepth ( depth)

Set depth.

Definition at line 341 of file box3.h.

template<typename T >
BALL_INLINE void BALL::TBox3< T >::setDepthVector ( const TVector3< T > &  v)

Set the depth vector.

Definition at line 366 of file box3.h.

template<typename T >
BALL_INLINE void BALL::TBox3< T >::setHeight ( height)

Set height.

Definition at line 332 of file box3.h.

template<typename T >
BALL_INLINE void BALL::TBox3< T >::setHeightVector ( const TVector3< T > &  v)

Set the height vector.

Definition at line 358 of file box3.h.

template<typename T>
void BALL::TBox3< T >::setPoint ( const TVector3< T > &  point)
inline

Set the point.

Definition at line 130 of file box3.h.

template<typename T >
BALL_INLINE void BALL::TBox3< T >::setRightVector ( const TVector3< T > &  v)

Set the right vector.

Definition at line 350 of file box3.h.

template<typename T >
BALL_INLINE void BALL::TBox3< T >::setWidth ( width)

Set width.

Definition at line 323 of file box3.h.

template<typename T >
void BALL::TBox3< T >::swap ( TBox3< T > &  box)

Swap the contents of two instances.

Parameters
boxthe box to swap contents with

Definition at line 296 of file box3.h.

Member Data Documentation

template<typename T>
T BALL::TBox3< T >::depth_
protected

Definition at line 221 of file box3.h.

template<typename T>
TVector3<T> BALL::TBox3< T >::depth_vector_
protected

Definition at line 217 of file box3.h.

template<typename T>
T BALL::TBox3< T >::height_
protected

Definition at line 220 of file box3.h.

template<typename T>
TVector3<T> BALL::TBox3< T >::height_vector_
protected

Definition at line 216 of file box3.h.

template<typename T>
TVector3<T> BALL::TBox3< T >::point_
protected

Definition at line 214 of file box3.h.

template<typename T>
TVector3<T> BALL::TBox3< T >::right_vector_
protected

Definition at line 215 of file box3.h.

template<typename T>
T BALL::TBox3< T >::width_
protected

Definition at line 219 of file box3.h.