packages/MC/geometry/Bounding_Box.i.hh
//---------------------------------------------------------------------------//
/*!
 * \brief Test the intersection of two bounding boxes.
 */
\brief Test the intersection of two bounding boxes.
\ brief Test the intersection of two bounding boxes .
bool Bounding_Box::intersects(const Bounding_Box& b) const
{
    using def::X; using def::Y; using def::Z;
    if (d_upper[X] < b.d_lower[X] || d_lower[X] > b.d_upper[X]) return false;
    if (d_upper[Y] < b.d_lower[Y] || d_lower[Y] > b.d_upper[Y]) return false;
    if (d_upper[Z] < b.d_lower[Z] || d_lower[Z] > b.d_upper[Z]) return false;
    return true;
}
bool Bounding_Box :: intersects ( const Bounding_Box & b ) const { using def :: X ; using def :: Y ; using def :: Z ; if ( d_upper [ X ] < b . d_lower [ X ] || d_lower [ X ] > b . d_upper [ X ] ) return false ; if ( d_upper [ Y ] < b . d_lower [ Y ] || d_lower [ Y ] > b . d_upper [ Y ] ) return false ; if ( d_upper [ Z ] < b . d_lower [ Z ] || d_lower [ Z ] > b . d_upper [ Z ] ) return false ; return true ; }
\brief Test the intersection of two bounding boxes.
\ brief Test the intersection of two bounding boxes .