moab
|
Public Member Functions | |
BSPTreePlaneIter (BSPTree *tool, const EntityHandle *path, int path_len) | |
BSPTreePlaneIter () | |
const BSPTree::Plane * | operator-> () const |
bool | operator== (const BSPTreePlaneIter &other) const |
bool | operator!= (const BSPTreePlaneIter &other) const |
BSPTreePlaneIter & | operator++ () |
Private Attributes | |
BSPTree * | toolPtr |
const EntityHandle *const | pathToRoot |
int | pathPos |
BSPTree::Plane | tmpPlane |
std::vector< EntityHandle > | tmpChildren |
Definition at line 1367 of file BSPTree.cpp.
moab::BSPTreePlaneIter::BSPTreePlaneIter | ( | BSPTree * | tool, |
const EntityHandle * | path, | ||
int | path_len | ||
) | [inline] |
Definition at line 1374 of file BSPTree.cpp.
: toolPtr(tool), pathToRoot(path), pathPos(path_len-1) { operator++(); }
moab::BSPTreePlaneIter::BSPTreePlaneIter | ( | ) | [inline] |
Definition at line 1377 of file BSPTree.cpp.
: toolPtr(0), pathToRoot(0), pathPos(-1) {}
bool moab::BSPTreePlaneIter::operator!= | ( | const BSPTreePlaneIter & | other | ) | const [inline] |
Definition at line 1384 of file BSPTree.cpp.
{ return pathPos != other.pathPos; }
BSPTreePlaneIter & moab::BSPTreePlaneIter::operator++ | ( | ) |
Definition at line 1389 of file BSPTree.cpp.
{ if (--pathPos < 0) return *this; EntityHandle prev = pathToRoot[pathPos+1]; EntityHandle curr = pathToRoot[pathPos]; ErrorCode rval = toolPtr->get_split_plane( curr, tmpPlane ); if (MB_SUCCESS != rval) { assert(false); pathPos = 0; return *this; } tmpChildren.clear(); rval = toolPtr->moab()->get_child_meshsets( curr, tmpChildren ); if (MB_SUCCESS != rval || tmpChildren.size() != 2) { assert(false); pathPos = 0; return *this; } if (tmpChildren[1] == prev) tmpPlane.flip(); return *this; }
const BSPTree::Plane* moab::BSPTreePlaneIter::operator-> | ( | ) | const [inline] |
Definition at line 1380 of file BSPTree.cpp.
{ return &tmpPlane; }
bool moab::BSPTreePlaneIter::operator== | ( | const BSPTreePlaneIter & | other | ) | const [inline] |
Definition at line 1382 of file BSPTree.cpp.
{ return pathPos == other.pathPos; }
int moab::BSPTreePlaneIter::pathPos [private] |
Definition at line 1370 of file BSPTree.cpp.
const EntityHandle* const moab::BSPTreePlaneIter::pathToRoot [private] |
Definition at line 1369 of file BSPTree.cpp.
std::vector<EntityHandle> moab::BSPTreePlaneIter::tmpChildren [private] |
Definition at line 1372 of file BSPTree.cpp.
Definition at line 1371 of file BSPTree.cpp.
BSPTree* moab::BSPTreePlaneIter::toolPtr [private] |
Definition at line 1368 of file BSPTree.cpp.