This is a helper class for iterating all the corners of a given box. More...
#include <mwsubdiv.h>
Public Member Functions | |
mwCorners (const tCubeFix< dim, coord > &q) | |
The only constructor allowed. | |
~mwCorners () | |
The destructor. | |
tCubeFix< dim, coord > | get () |
Returns the next available corner or throws an error message if all the corners have already been taken. | |
bool | available () const |
Returns true iff there is at least one more box available. | |
Private Member Functions | |
mwCorners (const mwCorners< dim, coord > &) | |
The copy constructor is not allowed. | |
mwCorners< dim, coord > & | operator= (const mwCorners< dim, coord > &) |
The assignment operator is not allowed. | |
Private Attributes | |
coord | left [dim] |
The coordinates of the leftmost corner of the iterated area. | |
coord | right [dim] |
The coordinates of the rightmost corner of the iterated area. | |
tRectangle< coord > | rect |
The actual corner iterator. | |
const coord * | next |
The next coordinates to return or 0 if none. |
This is a helper class for iterating all the corners of a given box.
Definition at line 425 of file mwsubdiv.h.
chomp::multiwork::mwCorners< dim, coord >::mwCorners | ( | const tCubeFix< dim, coord > & | q | ) | [inline] |
The only constructor allowed.
Definition at line 465 of file mwsubdiv.h.
References chomp::multiwork::mwCorners< dim, coord >::left, chomp::multiwork::mwCorners< dim, coord >::next, chomp::multiwork::mwCorners< dim, coord >::rect, and chomp::multiwork::mwCorners< dim, coord >::right.
chomp::multiwork::mwCorners< dim, coord >::~mwCorners | ( | ) | [inline] |
chomp::multiwork::mwCorners< dim, coord >::mwCorners | ( | const mwCorners< dim, coord > & | ) | [inline, private] |
The copy constructor is not allowed.
Definition at line 478 of file mwsubdiv.h.
{ return; } /* mwCorners::mwCorners */
bool chomp::multiwork::mwCorners< dim, coord >::available | ( | ) | const [inline] |
Returns true iff there is at least one more box available.
Definition at line 505 of file mwsubdiv.h.
References chomp::multiwork::mwCorners< dim, coord >::next.
{ return !!(this -> next); } /* mwCorners::available */
tCubeFix< dim, coord > chomp::multiwork::mwCorners< dim, coord >::get | ( | ) | [inline] |
Returns the next available corner or throws an error message if all the corners have already been taken.
Definition at line 497 of file mwsubdiv.h.
References chomp::multiwork::mwCorners< dim, coord >::next, and chomp::multiwork::mwCorners< dim, coord >::rect.
mwCorners< dim, coord > & chomp::multiwork::mwCorners< dim, coord >::operator= | ( | const mwCorners< dim, coord > & | ) | [inline, private] |
The assignment operator is not allowed.
Definition at line 485 of file mwsubdiv.h.
{ return *this; } /* mwCorners::operator = */
coord chomp::multiwork::mwCorners< dim, coord >::left[dim] [private] |
The coordinates of the leftmost corner of the iterated area.
Definition at line 449 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwCorners< dim, coord >::mwCorners().
const coord* chomp::multiwork::mwCorners< dim, coord >::next [private] |
The next coordinates to return or 0 if none.
Definition at line 458 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwCorners< dim, coord >::available(), chomp::multiwork::mwCorners< dim, coord >::get(), and chomp::multiwork::mwCorners< dim, coord >::mwCorners().
tRectangle<coord> chomp::multiwork::mwCorners< dim, coord >::rect [private] |
The actual corner iterator.
Definition at line 455 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwCorners< dim, coord >::get(), and chomp::multiwork::mwCorners< dim, coord >::mwCorners().
coord chomp::multiwork::mwCorners< dim, coord >::right[dim] [private] |
The coordinates of the rightmost corner of the iterated area.
Definition at line 452 of file mwsubdiv.h.
Referenced by chomp::multiwork::mwCorners< dim, coord >::mwCorners().