moab
moab::BSPTreePlaneIter Class Reference

List of all members.

Public Member Functions

 BSPTreePlaneIter (BSPTree *tool, const EntityHandle *path, int path_len)
 BSPTreePlaneIter ()
const BSPTree::Planeoperator-> () const
bool operator== (const BSPTreePlaneIter &other) const
bool operator!= (const BSPTreePlaneIter &other) const
BSPTreePlaneIteroperator++ ()

Private Attributes

BSPTreetoolPtr
const EntityHandle *const pathToRoot
int pathPos
BSPTree::Plane tmpPlane
std::vector< EntityHandletmpChildren

Detailed Description

Definition at line 1367 of file BSPTree.cpp.


Constructor & Destructor Documentation

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++(); }

Definition at line 1377 of file BSPTree.cpp.

      : toolPtr(0), pathToRoot(0), pathPos(-1) {}

Member Function Documentation

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; }

Member Data Documentation

Definition at line 1370 of file BSPTree.cpp.

Definition at line 1369 of file BSPTree.cpp.

Definition at line 1372 of file BSPTree.cpp.

Definition at line 1371 of file BSPTree.cpp.

Definition at line 1368 of file BSPTree.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines