Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
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 1221 of file BSPTree.cpp.

Constructor & Destructor Documentation

◆ BoxPlaneIter() [1/2]

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

Definition at line 1251 of file BSPTree.cpp.

1251  : faceNum( 0 )
1252 {
1253  // NOTE: In the case of a BSP tree, all sides of the
1254  // leaf will planar.
1255  assert( sizeof( CartVect ) == sizeof( coords[0] ) );
1256  const CartVect* corners = reinterpret_cast< const CartVect* >( coords );
1257  for( int i = 0; i < 6; ++i )
1258  {
1259  const int* indices = box_face_corners[i];
1260  CartVect v1 = corners[indices[1]] - corners[indices[0]];
1261  CartVect v2 = corners[indices[3]] - corners[indices[0]];
1262  CartVect n = v1 * v2;
1263  facePlanes[i] = BSPTree::Plane( n.array(), -( n % corners[indices[2]] ) );
1264  }
1265 }

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

◆ BoxPlaneIter() [2/2]

moab::BoxPlaneIter::BoxPlaneIter ( )
inline

Definition at line 1228 of file BSPTree.cpp.

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

Member Function Documentation

◆ operator!=()

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

Definition at line 1237 of file BSPTree.cpp.

1238  {
1239  return faceNum != other.faceNum;
1240  }

References faceNum.

◆ operator++()

BoxPlaneIter& moab::BoxPlaneIter::operator++ ( )
inline

Definition at line 1241 of file BSPTree.cpp.

1242  {
1243  ++faceNum;
1244  return *this;
1245  }

References faceNum.

◆ operator->()

const BSPTree::Plane* moab::BoxPlaneIter::operator-> ( ) const
inline

Definition at line 1229 of file BSPTree.cpp.

1230  {
1231  return facePlanes + faceNum;
1232  }

References faceNum, and facePlanes.

◆ operator==()

bool moab::BoxPlaneIter::operator== ( const BoxPlaneIter other) const
inline

Definition at line 1233 of file BSPTree.cpp.

1234  {
1235  return faceNum == other.faceNum;
1236  }

References faceNum.

Member Data Documentation

◆ faceNum

int moab::BoxPlaneIter::faceNum
private

Definition at line 1223 of file BSPTree.cpp.

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

◆ facePlanes

BSPTree::Plane moab::BoxPlaneIter::facePlanes[6]
private

Definition at line 1224 of file BSPTree.cpp.

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


The documentation for this class was generated from the following file: