Brève interruption de service ce midi pour augmentation de la mémoire 🤞

Commit 319bdb49 authored by Frédéric Larue's avatar Frédéric Larue

Bug fixed in the ray/box intersection computation function.

parent 455e0ca9
......@@ -658,6 +658,7 @@ inline bool Box3f::Intersects( const QVector3D& rayOrigin,
intersectionDist = std::numeric_limits<float>::max();
for( int i=0; i<3; ++i )
if( rayDirection[i] != 0.0f )
{
float frontFacingPlane = (rayDirection[i] > 0.0f)? m_Max[i] : m_Min[i];
float t = (frontFacingPlane - rayOrigin[i]) / rayDirection[i];
......@@ -673,6 +674,7 @@ inline bool Box3f::Intersects( const QVector3D& rayOrigin,
intersectionDist = 0.0f;
for( int i=0; i<3; ++i )
if( rayDirection[i] != 0.0f )
{
float frontFacingPlane = (rayDirection[i] > 0.0f)? m_Min[i] : m_Max[i];
float t = (frontFacingPlane - rayOrigin[i]) / rayDirection[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment