template class mola::FixedDenseGrid3D

Overview

A dense 3D grid holding cells of type “T” of fixed size NxNxN cells, with N=2^SIDE_NUM_BITS.

Used internally in SparseVoxelPointCloud

#include <FixedDenseGrid3D.h>

template <typename T, size_t SIDE_NUM_BITS, typename inner_coord_t>
class FixedDenseGrid3D
{
public:
    // fields

    static constexpr static size_t CELLS_PER_DIM = 1<<SIDE_NUM_BITS;
    static constexpr static size_t TOTAL_CELL_COUNT = 1<<(3* SIDE_NUM_BITS);

    // methods

    T& cellByIndex(const index3d_t<inner_coord_t>& idx);
    const T& cellByIndex(const index3d_t<inner_coord_t>& idx) const;
    const T* cells() const;
    T* cells();
};