moab
|
Public Member Functions | |
BoxPlaneIter (const double coords[8][3]) | |
BoxPlaneIter () | |
const BSPTree::Plane * | operator-> () const |
bool | operator== (const BoxPlaneIter &other) const |
bool | operator!= (const BoxPlaneIter &other) const |
BoxPlaneIter & | operator++ () |
Private Attributes | |
int | faceNum |
BSPTree::Plane | facePlanes [6] |
Definition at line 1315 of file BSPTree.cpp.
moab::BoxPlaneIter::BoxPlaneIter | ( | const double | coords[8][3] | ) |
Definition at line 1339 of file BSPTree.cpp.
: faceNum(0) { // NOTE: In the case of a BSP tree, all sides of the // leaf will planar. assert( sizeof(CartVect) == sizeof(coords[0]) ); const CartVect* corners = reinterpret_cast<const CartVect*>(coords); for (int i = 0; i < 6; ++i) { const int* indices = box_face_corners[i]; CartVect v1 = corners[indices[1]] - corners[indices[0]]; CartVect v2 = corners[indices[3]] - corners[indices[0]]; CartVect n = v1 * v2; facePlanes[i] = BSPTree::Plane( n.array(), -(n % corners[indices[2]]) ); } }
moab::BoxPlaneIter::BoxPlaneIter | ( | ) | [inline] |
Definition at line 1321 of file BSPTree.cpp.
: faceNum(6) {} // initialize to 'end'
bool moab::BoxPlaneIter::operator!= | ( | const BoxPlaneIter & | other | ) | const [inline] |
Definition at line 1326 of file BSPTree.cpp.
{ return faceNum != other.faceNum; }
BoxPlaneIter& moab::BoxPlaneIter::operator++ | ( | ) | [inline] |
Definition at line 1328 of file BSPTree.cpp.
{ ++faceNum; return *this; }
const BSPTree::Plane* moab::BoxPlaneIter::operator-> | ( | ) | const [inline] |
Definition at line 1322 of file BSPTree.cpp.
{ return facePlanes + faceNum; }
bool moab::BoxPlaneIter::operator== | ( | const BoxPlaneIter & | other | ) | const [inline] |
Definition at line 1324 of file BSPTree.cpp.
{ return faceNum == other.faceNum; }
int moab::BoxPlaneIter::faceNum [private] |
Definition at line 1316 of file BSPTree.cpp.
BSPTree::Plane moab::BoxPlaneIter::facePlanes[6] [private] |
Definition at line 1317 of file BSPTree.cpp.