| 66 | |
| 67 | template < geode::index_t dimension > |
| 68 | bool ray_quick_skip( const geode::BoundingBox< dimension >& box, |
| 69 | const geode::Ray< dimension >& ray ) |
| 70 | { |
| 71 | const auto box_half_extent = box.diagonal() / 2.; |
| 72 | const auto ray_translated_origin = ray.origin() - box.center(); |
| 73 | for( const auto i : geode::LRange{ dimension } ) |
| 74 | { |
| 75 | if( std::fabs( ray_translated_origin.value( i ) ) |
| 76 | - box_half_extent.value( i ) |
| 77 | > geode::GLOBAL_EPSILON |
| 78 | && ray_translated_origin.value( i ) * ray.direction().value( i ) |
| 79 | > geode::GLOBAL_EPSILON ) |
| 80 | { |
| 81 | return true; |
| 82 | } |
| 83 | } |
| 84 | return false; |
| 85 | } |
| 86 | |
| 87 | template < geode::index_t dimension > |
| 88 | bool segment_quick_skip( const geode::BoundingBox< dimension >& box, |
no test coverage detected