template struct mola::index3d_t

Overview

Discrete index type for voxel or 3D grid maps, suitable for std::map and std::unordered_map, using mola::index3d_hash as hash type.

#include <index3d_t.h>

template <typename cell_coord_t = int32_t>
struct index3d_t
{
    // fields

    cell_coord_t cx = 0;
    cell_coord_t cy = 0;
    cell_coord_t cz = 0;

    // construction

    index3d_t();

    index3d_t(
        cell_coord_t Cx,
        cell_coord_t Cy,
        cell_coord_t Cz
        );

    // methods

    bool operator == (const index3d_t<cell_coord_t>& o) const;
    bool operator != (const index3d_t<cell_coord_t>& o) const;
    index3d_t operator + (const index3d_t& o) const;
    index3d_t operator - (const index3d_t& o) const;
};