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.
|
inline |
Definition at line 1285 of file BSPTree.cpp.
1286 : toolPtr( tool ), pathToRoot( path ), pathPos( path_len - 1 )
1287 {
1288 operator++();
1289 }
References operator++().
|
inline |
Definition at line 1290 of file BSPTree.cpp.
1291 : toolPtr( 0 ), pathToRoot( 0 ), pathPos( -1 ) 1292 { 1293 }
|
inline |
Definition at line 1303 of file BSPTree.cpp.
1304 {
1305 return pathPos != other.pathPos;
1306 }
References pathPos.
BSPTreePlaneIter & moab::BSPTreePlaneIter::operator++ | ( | ) |
Definition at line 1310 of file BSPTree.cpp.
1311 {
1312 if( --pathPos < 0 ) return *this;
1313
1314 EntityHandle prev = pathToRoot[pathPos + 1];
1315 EntityHandle curr = pathToRoot[pathPos];
1316
1317 ErrorCode rval = toolPtr->get_split_plane( curr, tmpPlane );
1318 if( MB_SUCCESS != rval )
1319 {
1320 assert( false );
1321 pathPos = 0;
1322 return *this;
1323 }
1324
1325 tmpChildren.clear();
1326 rval = toolPtr->moab()->get_child_meshsets( curr, tmpChildren );
1327 if( MB_SUCCESS != rval || tmpChildren.size() != 2 )
1328 {
1329 assert( false );
1330 pathPos = 0;
1331 return *this;
1332 }
1333
1334 if( tmpChildren[1] == prev ) tmpPlane.flip();
1335 return *this;
1336 }
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().
|
inline |
Definition at line 1295 of file BSPTree.cpp.
1296 {
1297 return &tmpPlane;
1298 }
References tmpPlane.
|
inline |
Definition at line 1299 of file BSPTree.cpp.
1300 {
1301 return pathPos == other.pathPos;
1302 }
References pathPos.
|
private |
Definition at line 1280 of file BSPTree.cpp.
Referenced by operator!=(), operator++(), and operator==().
|
private |
Definition at line 1279 of file BSPTree.cpp.
Referenced by operator++().
|
private |
Definition at line 1282 of file BSPTree.cpp.
Referenced by operator++().
|
private |
Definition at line 1281 of file BSPTree.cpp.
Referenced by operator++(), and operator->().
|
private |
Definition at line 1278 of file BSPTree.cpp.
Referenced by operator++().