float TriangleMesh::IntersectRay_TriangleIndex_UV(const Ray &ray, int &outTriangleIndex, float &outU, float &outV) const { #ifdef MATH_AVX if (simdCapability == SIMD_AVX) return IntersectRay_TriangleIndex_UV_AVX(ray, outTriangleIndex, outU, outV); #endif #ifdef MATH_SSE41 if (simdCapability == SIMD_SSE41) return IntersectRay_TriangleIndex_UV_SSE41(ray, outTriangleIndex, outU, outV); #endif #ifdef MATH_SSE2 if (simdCapability == SIMD_SSE2) return IntersectRay_TriangleIndex_UV_SSE2(ray, outTriangleIndex, outU, outV); #endif return IntersectRay_TriangleIndex_UV_CPP(ray, outTriangleIndex, outU, outV); }
float TriangleMesh::IntersectRay_TriangleIndex_UV(const Ray &ray, int &outTriangleIndex, float &outU, float &outV) const { #ifndef MATH_AUTOMATIC_SSE // TODO: Restore support for this when MATH_AUTOMATIC_SSE is defined! #ifdef MATH_AVX if (simdCapability == SIMD_AVX) return IntersectRay_TriangleIndex_UV_AVX(ray, outTriangleIndex, outU, outV); #endif #ifdef MATH_SSE41 if (simdCapability == SIMD_SSE41) return IntersectRay_TriangleIndex_UV_SSE41(ray, outTriangleIndex, outU, outV); #endif #ifdef MATH_SSE2 if (simdCapability == SIMD_SSE2) return IntersectRay_TriangleIndex_UV_SSE2(ray, outTriangleIndex, outU, outV); #endif #endif return IntersectRay_TriangleIndex_UV_CPP(ray, outTriangleIndex, outU, outV); }
float TriangleMesh::IntersectRay(const Ray &ray) const { #ifdef MATH_AVX if (simdCapability == SIMD_AVX) return IntersectRay_AVX(ray); #endif #ifdef MATH_SSE41 if (simdCapability == SIMD_SSE41) return IntersectRay_SSE41(ray); #endif #ifdef MATH_SSE2 if (simdCapability == SIMD_SSE2) return IntersectRay_SSE2(ray); #endif int triangleIndex; float u, v; return IntersectRay_TriangleIndex_UV_CPP(ray, triangleIndex, u, v); }
float TriangleMesh::IntersectRay(const Ray &ray) const { #ifndef MATH_AUTOMATIC_SSE // TODO: Restore support for this when MATH_AUTOMATIC_SSE is defined! #ifdef MATH_AVX if (simdCapability == SIMD_AVX) return IntersectRay_AVX(ray); #endif #ifdef MATH_SSE41 if (simdCapability == SIMD_SSE41) return IntersectRay_SSE41(ray); #endif #ifdef MATH_SSE2 if (simdCapability == SIMD_SSE2) return IntersectRay_SSE2(ray); #endif #endif int triangleIndex; float u, v; return IntersectRay_TriangleIndex_UV_CPP(ray, triangleIndex, u, v); }