Skip to content

Commit

Permalink
in adjustNormalsToViewPoint viewpoint check exceeds array bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck-Ellison committed Dec 12, 2024
1 parent 38cacb7 commit 3e0d4c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corelib/src/util3d_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3530,7 +3530,7 @@ LaserScan adjustNormalsToViewPoint(

float result = v.dot(n);
if(result < 0
|| (groundNormalsUp>0.0f && ptr[nz] < -groundNormalsUp && ptr[2] < viewpoint[3])) // some far velodyne rays on road can have normals toward ground
|| (groundNormalsUp>0.0f && ptr[nz] < -groundNormalsUp && ptr[2] < viewpoint[2])) // some far velodyne rays on road can have normals toward ground
{
//reverse normal
ptr[nx] *= -1.0f;
Expand Down

0 comments on commit 3e0d4c2

Please sign in to comment.