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 PosSizeLt > | Map |
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... | |
small class which defines a 3D Box
|
inline |
constructor
generic constructor
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==().
|
inline |
extends the bdbox by (val, val) keeping the center
the maximum 3D point (in x and in y)
the minimum 3D point (in x and in y)
comparison operator!=
comparison operator< : fist sorts min by Y,X values then max extremity
comparison operator==
the two extremum points which defined the box
c | 0 means the minimum and 1 the maximum |
resize the box keeping the center
resize the box keeping the maximum
resize the box keeping the minimum
scales all points of the box by factor
|
inline |
resets the data to minimum x and maximum y
resets the maximum point
resets the minimum point
|
friend |
print data in form X0xY0xZ0<->X1xY1xZ1
the two extremities
Referenced by MWAWBox3< T >::center(), MWAWBox3< T >::cmp(), MWAWBox3< T >::extend(), MWAWBox3< T >::max(), MWAWBox3< T >::min(), MWAWBox3< T >::MWAWBox3(), MWAWBox3< T >::operator[](), MWAWBox3< T >::resizeFromCenter(), MWAWBox3< T >::resizeFromMax(), MWAWBox3< T >::resizeFromMin(), MWAWBox3< T >::scale(), MWAWBox3< T >::set(), MWAWBox3< T >::setMax(), MWAWBox3< T >::setMin(), and MWAWBox3< T >::size().