MWAWBox3< T > Class Template Reference

small class which defines a 3D Box More...

#include <libmwaw_internal.hxx>

Classes

struct  PosSizeLt
 internal struct used to create sorted map, sorted first min then max More...
 

Public Types

typedef std::map< MWAWBox3< T >, T, struct PosSizeLtMap
 map of MWAWBox3 More...
 

Public Member Functions

 MWAWBox3 (MWAWVec3< T > minPt=MWAWVec3< T >(), MWAWVec3< T > maxPt=MWAWVec3< T >())
 constructor More...
 
template<class U >
 MWAWBox3 (MWAWBox3< U > const &p)
 generic constructor More...
 
MWAWVec3< T > const & min () const
 the minimum 3D point (in x and in y) More...
 
MWAWVec3< T > const & max () const
 the maximum 3D point (in x and in y) More...
 
MWAWVec3< T > & min ()
 the minimum 3D point (in x and in y) More...
 
MWAWVec3< T > & max ()
 the maximum 3D point (in x and in y) More...
 
MWAWVec3< T > const & operator[] (int c) const
 the two extremum points which defined the box More...
 
MWAWVec3< T > size () const
 the box size More...
 
MWAWVec3< T > center () const
 the box center More...
 
void set (MWAWVec3< T > const &x, MWAWVec3< T > const &y)
 resets the data to minimum x and maximum y More...
 
void setMin (MWAWVec3< T > const &x)
 resets the minimum point More...
 
void setMax (MWAWVec3< T > const &y)
 resets the maximum point More...
 
void resizeFromMin (MWAWVec3< T > const &sz)
 resize the box keeping the minimum More...
 
void resizeFromMax (MWAWVec3< T > const &sz)
 resize the box keeping the maximum More...
 
void resizeFromCenter (MWAWVec3< T > const &sz)
 resize the box keeping the center More...
 
template<class U >
void scale (U factor)
 scales all points of the box by factor More...
 
void extend (T val)
 extends the bdbox by (val, val) keeping the center More...
 
bool operator== (MWAWBox3< T > const &p) const
 comparison operator== More...
 
bool operator!= (MWAWBox3< T > const &p) const
 comparison operator!= More...
 
bool operator< (MWAWBox3< T > const &p) const
 comparison operator< : fist sorts min by Y,X values then max extremity More...
 
int cmp (MWAWBox3< T > const &p) const
 comparison function : fist sorts min by Y,X values then max extremity More...
 

Protected Attributes

MWAWVec3< T > m_pt [2]
 the two extremities More...
 

Friends

std::ostream & operator<< (std::ostream &o, MWAWBox3< T > const &f)
 print data in form X0xY0xZ0<->X1xY1xZ1 More...
 

Detailed Description

template<class T>
class MWAWBox3< T >

small class which defines a 3D Box

Member Typedef Documentation

template<class T>
MWAWBox3< T >::Map

map of MWAWBox3

Constructor & Destructor Documentation

template<class T>
MWAWBox3< T >::MWAWBox3 ( MWAWVec3< T >  minPt = MWAWVec3<T>(),
MWAWVec3< T >  maxPt = MWAWVec3<T>() 
)
inline

constructor

template<class T>
template<class U >
MWAWBox3< T >::MWAWBox3 ( MWAWBox3< U > const &  p)
inline

generic constructor

Member Function Documentation

template<class T>
MWAWVec3<T> MWAWBox3< T >::center ( ) const
inline

the box center

template<class T>
int MWAWBox3< T >::cmp ( MWAWBox3< T > const &  p) const
inline

comparison function : fist sorts min by Y,X values then max extremity

Referenced by MWAWBox3< T >::operator!=(), MWAWBox3< T >::PosSizeLt::operator()(), MWAWBox3< T >::operator<(), and MWAWBox3< T >::operator==().

template<class T>
void MWAWBox3< T >::extend ( val)
inline

extends the bdbox by (val, val) keeping the center

template<class T>
MWAWVec3<T> const& MWAWBox3< T >::max ( ) const
inline

the maximum 3D point (in x and in y)

template<class T>
MWAWVec3<T>& MWAWBox3< T >::max ( )
inline

the maximum 3D point (in x and in y)

template<class T>
MWAWVec3<T> const& MWAWBox3< T >::min ( ) const
inline

the minimum 3D point (in x and in y)

template<class T>
MWAWVec3<T>& MWAWBox3< T >::min ( )
inline

the minimum 3D point (in x and in y)

template<class T>
bool MWAWBox3< T >::operator!= ( MWAWBox3< T > const &  p) const
inline

comparison operator!=

template<class T>
bool MWAWBox3< T >::operator< ( MWAWBox3< T > const &  p) const
inline

comparison operator< : fist sorts min by Y,X values then max extremity

template<class T>
bool MWAWBox3< T >::operator== ( MWAWBox3< T > const &  p) const
inline

comparison operator==

template<class T>
MWAWVec3<T> const& MWAWBox3< T >::operator[] ( int  c) const
inline

the two extremum points which defined the box

Parameters
c0 means the minimum and 1 the maximum
template<class T>
void MWAWBox3< T >::resizeFromCenter ( MWAWVec3< T > const &  sz)
inline

resize the box keeping the center

template<class T>
void MWAWBox3< T >::resizeFromMax ( MWAWVec3< T > const &  sz)
inline

resize the box keeping the maximum

template<class T>
void MWAWBox3< T >::resizeFromMin ( MWAWVec3< T > const &  sz)
inline

resize the box keeping the minimum

template<class T>
template<class U >
void MWAWBox3< T >::scale ( factor)
inline

scales all points of the box by factor

template<class T>
void MWAWBox3< T >::set ( MWAWVec3< T > const &  x,
MWAWVec3< T > const &  y 
)
inline

resets the data to minimum x and maximum y

template<class T>
void MWAWBox3< T >::setMax ( MWAWVec3< T > const &  y)
inline

resets the maximum point

template<class T>
void MWAWBox3< T >::setMin ( MWAWVec3< T > const &  x)
inline

resets the minimum point

template<class T>
MWAWVec3<T> MWAWBox3< T >::size ( ) const
inline

the box size

Friends And Related Function Documentation

template<class T>
std::ostream& operator<< ( std::ostream &  o,
MWAWBox3< T > const &  f 
)
friend

print data in form X0xY0xZ0<->X1xY1xZ1

Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Thu Nov 26 2015 09:13:49 for libmwaw by doxygen 1.8.9.1