moab
moab::BoxPlaneIter Class Reference

List of all members.

Public Member Functions

 BoxPlaneIter (const double coords[8][3])
 BoxPlaneIter ()
const BSPTree::Planeoperator-> () const
bool operator== (const BoxPlaneIter &other) const
bool operator!= (const BoxPlaneIter &other) const
BoxPlaneIteroperator++ ()

Private Attributes

int faceNum
BSPTree::Plane facePlanes [6]

Detailed Description

Definition at line 1315 of file BSPTree.cpp.


Constructor & Destructor Documentation

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

Definition at line 1321 of file BSPTree.cpp.

: faceNum(6) {} // initialize to 'end'

Member Function Documentation

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

Member Data Documentation

Definition at line 1316 of file BSPTree.cpp.

Definition at line 1317 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