Hi, I used the visibility computation from the gain() function in rrt.cpp and found two issues:
in rrt.cpp, line 529
if(dir.norm()>rangeSq)
The function norm() computes the actual norm, not the square of it. Hence shouldn't this be changed to:
if(dir.transpose().dot(dir)>rangeSq)
in rrt.cpp, line 547:
if(!inFoV)
Don't we want to break this loop, when a point is INSIDE the field of view. Hence this should be:
if(inFOV)
Otherwise only points OUTSIDE the FoV will be used for the computation of the gain, which does not make sense.
I used this code to compute the visibility within my own work, and it did only give the proper results after I made those two changes.
I just noticed that the 2nd point was changed due to the closed issue #6 . However, after this change the computation is wrong, the way it was done before was correct.
Hi, I used the visibility computation from the gain() function in rrt.cpp and found two issues:
in rrt.cpp, line 529
if(dir.norm()>rangeSq)
The function norm() computes the actual norm, not the square of it. Hence shouldn't this be changed to:if(dir.transpose().dot(dir)>rangeSq)
in rrt.cpp, line 547:
if(!inFoV)
Don't we want to break this loop, when a point is INSIDE the field of view. Hence this should be:if(inFOV)
Otherwise only points OUTSIDE the FoV will be used for the computation of the gain, which does not make sense.I used this code to compute the visibility within my own work, and it did only give the proper results after I made those two changes.
I just noticed that the 2nd point was changed due to the closed issue #6 . However, after this change the computation is wrong, the way it was done before was correct.