![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
Public Member Functions | |
BoxPlaneIter (const double coords[8][3]) | |
BoxPlaneIter () | |
const BSPTree::Plane * | operator-> () const |
bool | operator== (const BoxPlaneIter &other) const |
bool | operator!= (const BoxPlaneIter &other) const |
BoxPlaneIter & | operator++ () |
Private Attributes | |
int | faceNum |
BSPTree::Plane | facePlanes [6] |
Definition at line 1221 of file BSPTree.cpp.
moab::BoxPlaneIter::BoxPlaneIter | ( | const double | coords[8][3] | ) |
Definition at line 1251 of file BSPTree.cpp.
References moab::CartVect::array(), moab::box_face_corners, and facePlanes.
: 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]] ) );
}
}
moab::BoxPlaneIter::BoxPlaneIter | ( | ) | [inline] |
Definition at line 1228 of file BSPTree.cpp.
: faceNum( 6 ) {} // initialize to 'end'
bool moab::BoxPlaneIter::operator!= | ( | const BoxPlaneIter & | other | ) | const [inline] |
Definition at line 1237 of file BSPTree.cpp.
References faceNum.
{
return faceNum != other.faceNum;
}
BoxPlaneIter& moab::BoxPlaneIter::operator++ | ( | ) | [inline] |
const BSPTree::Plane* moab::BoxPlaneIter::operator-> | ( | ) | const [inline] |
Definition at line 1229 of file BSPTree.cpp.
References faceNum, and facePlanes.
{
return facePlanes + faceNum;
}
bool moab::BoxPlaneIter::operator== | ( | const BoxPlaneIter & | other | ) | const [inline] |
Definition at line 1233 of file BSPTree.cpp.
References faceNum.
{
return faceNum == other.faceNum;
}
int moab::BoxPlaneIter::faceNum [private] |
Definition at line 1223 of file BSPTree.cpp.
Referenced by operator!=(), operator++(), operator->(), and operator==().
BSPTree::Plane moab::BoxPlaneIter::facePlanes[6] [private] |
Definition at line 1224 of file BSPTree.cpp.
Referenced by BoxPlaneIter(), and operator->().