|
gtsam_points
|
Raycasting-based voxel traversal algorithm. The iterator traverses voxel coordinates intersected by the ray but excludes the end voxel. J. Amanatides and A. Woo, "A Fast Voxel Traversal Algorithm for Ray Tracing", Eurographics, 1987. More...
#include <voxel_raycaster.hpp>
Classes | |
| class | Iterator |
| Iterator for traversing voxel coordinates along the ray. More... | |
Public Member Functions | |
| VoxelRaycaster (const Eigen::Vector4d &start, const Eigen::Vector4d &end, double voxel_size) | |
| Constructor. | |
| Iterator | begin () const |
| Get the begin iterator. (begin() == start_coord) | |
| Iterator | end () const |
| Get the end iterator. (end() == end_coord) | |
| const Eigen::Vector3i & | start_voxel () const |
| Get the start voxel coordinate. | |
| const Eigen::Vector3i & | end_voxel () const |
| Get the end voxel coordinate. | |
Raycasting-based voxel traversal algorithm. The iterator traverses voxel coordinates intersected by the ray but excludes the end voxel. J. Amanatides and A. Woo, "A Fast Voxel Traversal Algorithm for Ray Tracing", Eurographics, 1987.
gtsam_points::VoxelRaycaster ray(Eigen::Vector4d(10.0, 20.0, 30.0, 1.0), Eigen::Vector4d(5.0, 10.0, 15.0, 1.0), 1.0); std::vector<Eigen::Vector3i> voxels; for (auto itr = ray.begin(); itr != ray.end(); ++itr) { voxels.emplace_back(*itr); } voxels.emplace_back(ray.end_coord); // Include the end voxel if needed
| gtsam_points::VoxelRaycaster::VoxelRaycaster | ( | const Eigen::Vector4d & | start, |
| const Eigen::Vector4d & | end, | ||
| double | voxel_size | ||
| ) |
Constructor.
| start | Start point of the ray (homogeneous coordinates) |
| end | End point of the ray (homogeneous coordinates) |
| voxel_size | Size of each voxel |