Class VoxelGrid

Nested Relationships

Nested Types

Class Documentation

class VoxelGrid

Public Functions

VoxelGrid(unsigned int size_x, unsigned int size_y, unsigned int size_z)

Constructor for a voxel grid.

Parameters:
  • size_x – The x size of the grid

  • size_y – The y size of the grid

  • size_z – The z size of the grid, only sizes <= 16 are supported

~VoxelGrid()
void resize(unsigned int size_x, unsigned int size_y, unsigned int size_z)

Resizes a voxel grid to the desired size.

Parameters:
  • size_x – The x size of the grid

  • size_y – The y size of the grid

  • size_z – The z size of the grid, only sizes <= 16 are supported

void reset()
inline uint32_t *getData()
inline void markVoxel(unsigned int x, unsigned int y, unsigned int z)
inline bool markVoxelInMap(unsigned int x, unsigned int y, unsigned int z, unsigned int marked_threshold)
inline void clearVoxel(unsigned int x, unsigned int y, unsigned int z)
inline void clearVoxelColumn(unsigned int index)
inline void clearVoxelInMap(unsigned int x, unsigned int y, unsigned int z)
inline bool bitsBelowThreshold(unsigned int n, unsigned int bit_threshold)
void markVoxelLine(double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length = UINT_MAX)
void clearVoxelLine(double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length = UINT_MAX, unsigned int min_length = 0)
void clearVoxelLineInMap(double x0, double y0, double z0, double x1, double y1, double z1, unsigned char *map_2d, unsigned int unknown_threshold, unsigned int mark_threshold, unsigned char free_cost = 0, unsigned char unknown_cost = 255, unsigned int max_length = UINT_MAX, unsigned int min_length = 0)
VoxelStatus getVoxel(unsigned int x, unsigned int y, unsigned int z)
VoxelStatus getVoxelColumn(unsigned int x, unsigned int y, unsigned int unknown_threshold = 0, unsigned int marked_threshold = 0)
void printVoxelGrid()
void printColumnGrid()
unsigned int sizeX()
unsigned int sizeY()
unsigned int sizeZ()
template<class ActionType>
inline void raytraceLine(ActionType at, double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length = UINT_MAX, unsigned int min_length = 0)

Public Static Functions

static inline unsigned int numBits(unsigned int n)
static inline VoxelStatus getVoxel(unsigned int x, unsigned int y, unsigned int z, unsigned int size_x, unsigned int size_y, unsigned int size_z, const uint32_t *data)