segmatch/include/segmatch/dynamic_voxel_grid.hpp
/// \brief Initializes a new instance of the DynamicVoxelGrid class.
/// \param resolution Edge length of the voxels.
/// \param min_points_per_voxel Minimum number of points that a voxel must contain in order to be
/// considered \e active.
/// \param origin The point around which the grid is centered.
\brief Initializes a new instance of the DynamicVoxelGrid class.
\param resolution Edge length of the voxels.
\param min_points_per_voxel Minimum number of points that a voxel must contain in order to be
considered \e active.
\param origin The point around which the grid is centered.
\ brief Initializes a new instance of the DynamicVoxelGrid class . \ param resolution Edge length of the voxels . \ param min_points_per_voxel Minimum number of points that a voxel must contain in order to be considered \ e active . \ param origin The point around which the grid is centered .
DynamicVoxelGrid(const float resolution, const int min_points_per_voxel,
                   const InputPointT& origin = InputPointT())
    : resolution_(resolution)
    , min_points_per_voxel_(min_points_per_voxel)
    , origin_(origin)
    , grid_size_(
        resolution * static_cast<float>(n_voxels_x),
        resolution * static_cast<float>(n_voxels_y),
        resolution * static_cast<float>(n_voxels_z))
    , origin_offset_(origin.getVector3fMap())
    , indexing_offset_(grid_size_ / 2.0f - origin_offset_)
    , world_to_grid_(1.0f / resolution)
    , min_corner_(origin_offset_ - grid_size_ / 2.0f)
    , max_corner_(origin_offset_ + grid_size_ / 2.0f)
    , active_centroids_(new VoxelCloud())
    , inactive_centroids_(new VoxelCloud())
    , pose_transformation_()
    , indexing_transformation_() {
    CHECK_GT(resolution, 0.0f);
    CHECK_GE(min_points_per_voxel, 1);
  }
DynamicVoxelGrid ( const float resolution , const int min_points_per_voxel , const InputPointT & origin = InputPointT ( ) ) : resolution_ ( resolution ) , min_points_per_voxel_ ( min_points_per_voxel ) , origin_ ( origin ) , grid_size_ ( resolution * static_cast < float > ( n_voxels_x ) , resolution * static_cast < float > ( n_voxels_y ) , resolution * static_cast < float > ( n_voxels_z ) ) , origin_offset_ ( origin . getVector3fMap ( ) ) , indexing_offset_ ( grid_size_ / 2.0f - origin_offset_ ) , world_to_grid_ ( 1.0f / resolution ) , min_corner_ ( origin_offset_ - grid_size_ / 2.0f ) , max_corner_ ( origin_offset_ + grid_size_ / 2.0f ) , active_centroids_ ( new VoxelCloud ( ) ) , inactive_centroids_ ( new VoxelCloud ( ) ) , pose_transformation_ ( ) , indexing_transformation_ ( ) { CHECK_GT ( resolution , 0.0f ) ; CHECK_GE ( min_points_per_voxel , 1 ) ; }
\brief Initializes a new instance of the DynamicVoxelGrid class.
\ brief Initializes a new instance of the DynamicVoxelGrid class .
// Validate inputs.