diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp index e37bb10410..2910ccdf7e 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp @@ -918,7 +918,6 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER *aStatusTextReporter ) } m_accelerator = 0; - //m_accelerator = new CGRID( m_object_container ); m_accelerator = new CBVH_PBRT( m_object_container ); #ifdef PRINT_STATISTICS_3D_VIEWER diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/ray.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/ray.cpp index c475d93d77..a4826d69a7 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/ray.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/ray.cpp @@ -50,9 +50,9 @@ void RAY::Init( const SFVEC3F& o, const SFVEC3F& d ) // Amy Williams Steve Barrus R. Keith Morley Peter Shirley // University of Utah // http://people.csail.mit.edu/amy/papers/box-jgt.pdf - m_dirIsNeg[0] = m_Dir.x <= 0.0f; - m_dirIsNeg[1] = m_Dir.y <= 0.0f; - m_dirIsNeg[2] = m_Dir.z <= 0.0f; + m_dirIsNeg[0] = m_Dir.x < 0.0f; + m_dirIsNeg[1] = m_Dir.y < 0.0f; + m_dirIsNeg[2] = m_Dir.z < 0.0f; // ray slope diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cbbox.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cbbox.cpp index aef633dd4d..72d007e621 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cbbox.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cbbox.cpp @@ -271,7 +271,7 @@ SFVEC3F CBBOX::Offset( const SFVEC3F &p ) const // https://github.com/mmp/pbrt-v2/blob/master/src/core/geometry.cpp#L68 // ///////////////////////////////////////////////////////////////////////// #if 0 -bool CBBOX::Intersect( const RAY &aRay, float *aOutHitt0, float *aOutHitt1 ) +bool CBBOX::Intersect( const RAY &aRay, float *aOutHitt0, float *aOutHitt1 ) const { float t0 = 0.0f; float t1 = FLT_MAX;