MOAB: Mesh Oriented datABase  (version 5.3.1)
moab::BoxPlaneIter Class Reference
+ Collaboration diagram for moab::BoxPlaneIter:

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 1212 of file BSPTree.cpp.


Constructor & Destructor Documentation

moab::BoxPlaneIter::BoxPlaneIter ( const double  coords[8][3])

Definition at line 1242 of file BSPTree.cpp.

References moab::CartVect::array(), moab::box_face_corners, corners, facePlanes, and n.

                                                      : 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 1219 of file BSPTree.cpp.

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

Member Function Documentation

bool moab::BoxPlaneIter::operator!= ( const BoxPlaneIter other) const [inline]

Definition at line 1228 of file BSPTree.cpp.

References faceNum.

    {
        return faceNum != other.faceNum;
    }
BoxPlaneIter& moab::BoxPlaneIter::operator++ ( ) [inline]

Definition at line 1232 of file BSPTree.cpp.

References faceNum.

    {
        ++faceNum;
        return *this;
    }
const BSPTree::Plane* moab::BoxPlaneIter::operator-> ( ) const [inline]

Definition at line 1220 of file BSPTree.cpp.

References faceNum, and facePlanes.

    {
        return facePlanes + faceNum;
    }
bool moab::BoxPlaneIter::operator== ( const BoxPlaneIter other) const [inline]

Definition at line 1224 of file BSPTree.cpp.

References faceNum.

    {
        return faceNum == other.faceNum;
    }

Member Data Documentation

Definition at line 1214 of file BSPTree.cpp.

Referenced by operator!=(), operator++(), operator->(), and operator==().

Definition at line 1215 of file BSPTree.cpp.

Referenced by BoxPlaneIter(), and operator->().

List of all members.


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