Browse Source

Fixes lp Bug #1828747 - Add some epsilon value to ray dir on orthographic mode

so they will not be zero when viewing the board com the top/bot.
This was causing problems with BBox intersect function that was using
invDir values.
pull/15/head
Mario Luzeiro 7 years ago
committed by jean-pierre charras
parent
commit
b9a17b928a
  1. 4
      3d-viewer/3d_rendering/ccamera.cpp

4
3d-viewer/3d_rendering/ccamera.cpp

@ -310,7 +310,7 @@ void CCAMERA::MakeRay( const SFVEC2I &aWindowPos,
case PROJECTION_ORTHO:
aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
aOutDirection = -m_dir;
aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
break;
}
}
@ -341,7 +341,7 @@ void CCAMERA::MakeRay( const SFVEC2F &aWindowPos, SFVEC3F &aOutOrigin, SFVEC3F &
case PROJECTION_ORTHO:
aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
aOutDirection = -m_dir;
aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
break;
}
}

Loading…
Cancel
Save