MOAB: Mesh Oriented datABase
(version 5.4.1)
|
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 1276 of file BSPTree.cpp.
moab::BSPTreePlaneIter::BSPTreePlaneIter | ( | BSPTree * | tool, |
const EntityHandle * | path, | ||
int | path_len | ||
) | [inline] |
Definition at line 1285 of file BSPTree.cpp.
References operator++().
: toolPtr( tool ), pathToRoot( path ), pathPos( path_len - 1 ) { operator++(); }
moab::BSPTreePlaneIter::BSPTreePlaneIter | ( | ) | [inline] |
Definition at line 1290 of file BSPTree.cpp.
: toolPtr( 0 ), pathToRoot( 0 ), pathPos( -1 ) { }
bool moab::BSPTreePlaneIter::operator!= | ( | const BSPTreePlaneIter & | other | ) | const [inline] |
Definition at line 1303 of file BSPTree.cpp.
References pathPos.
{ return pathPos != other.pathPos; }
BSPTreePlaneIter & moab::BSPTreePlaneIter::operator++ | ( | ) |
Definition at line 1310 of file BSPTree.cpp.
References ErrorCode, moab::BSPTree::Plane::flip(), moab::Interface::get_child_meshsets(), moab::BSPTree::get_split_plane(), MB_SUCCESS, moab::BSPTree::moab(), pathPos, pathToRoot, tmpChildren, tmpPlane, and toolPtr.
Referenced by BSPTreePlaneIter().
{ 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] |
bool moab::BSPTreePlaneIter::operator== | ( | const BSPTreePlaneIter & | other | ) | const [inline] |
Definition at line 1299 of file BSPTree.cpp.
References pathPos.
{ return pathPos == other.pathPos; }
int moab::BSPTreePlaneIter::pathPos [private] |
Definition at line 1280 of file BSPTree.cpp.
Referenced by operator!=(), operator++(), and operator==().
const EntityHandle* const moab::BSPTreePlaneIter::pathToRoot [private] |
Definition at line 1279 of file BSPTree.cpp.
Referenced by operator++().
std::vector< EntityHandle > moab::BSPTreePlaneIter::tmpChildren [private] |
Definition at line 1282 of file BSPTree.cpp.
Referenced by operator++().
Definition at line 1281 of file BSPTree.cpp.
Referenced by operator++(), and operator->().
BSPTree* moab::BSPTreePlaneIter::toolPtr [private] |
Definition at line 1278 of file BSPTree.cpp.
Referenced by operator++().