| 229 | |
| 230 | template<typename T> |
| 231 | MultiMeshIntersectionResult rayMultiMeshAnyIntersect_( const std::vector<Line3Mesh<T>> & lineMeshes, |
| 232 | T rayStart /*= 0.0f*/, T rayEnd /*= FLT_MAX */ ) |
| 233 | { |
| 234 | MultiMeshIntersectionResult res; |
| 235 | for ( const auto & lm : lineMeshes ) |
| 236 | { |
| 237 | assert( lm.mesh ); |
| 238 | auto prec = lm.prec; |
| 239 | IntersectionPrecomputes<T> myPrec; |
| 240 | if ( !prec ) |
| 241 | { |
| 242 | myPrec = { lm.line.d }; |
| 243 | prec = &myPrec; |
| 244 | } |
| 245 | if ( auto r = meshRayIntersect_( { *lm.mesh, lm.region }, lm.line, rayStart, rayEnd, *prec, false, {} ) ) |
| 246 | { |
| 247 | res = MultiMeshIntersectionResult{ r }; |
| 248 | break; |
| 249 | } |
| 250 | } |
| 251 | return res; |
| 252 | } |
| 253 | |
| 254 | MultiMeshIntersectionResult rayMultiMeshAnyIntersect( const std::vector<Line3fMesh> & lineMeshes, |
| 255 | float rayStart, float rayEnd ) |
no test coverage detected