Skip to content

Conversation

@Naoki-Hiraoka
Copy link

@Naoki-Hiraoka Naoki-Hiraoka commented Jul 1, 2024

When I executed the following code, I got a strange result.

GlobalIndex global_voxel_idx;
RayCaster ray_caster(Point(0.0,0.0,0.0), Point(0.0,1.0,0.0), false,
                     true,
                     5.0, 1 / 0.2,
                     0.1, false);
while (ray_caster.nextRayIndex(&global_voxel_idx)) {
  std::cout << global_voxel_idx.transpose() << std::endl;
 }
# result
0 5 0
0 5 0
0 5 0
0 5 0
0 5 0
0 5 0

The expected result is

0 5 0
0 4 0
0 3 0
0 2 0
0 1 0
0 0 0

This is because there are zero divisions in RayCaster::setupRayCaster.
This Pull Request fixes this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant