#include <voxel_grid.h>
Classes | |
class | ClearVoxel |
class | ClearVoxelInMap |
class | GridOffset |
class | MarkVoxel |
class | ZOffset |
Public Member Functions | |
bool | bitsBelowThreshold (unsigned int n, unsigned int bit_threshold) |
void | clearVoxel (unsigned int x, unsigned int y, unsigned int z) |
void | clearVoxelColumn (unsigned int index) |
void | clearVoxelInMap (unsigned int x, unsigned int y, unsigned int z) |
void | clearVoxelLine (double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length=UINT_MAX) |
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) |
uint32_t * | getData () |
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 | markVoxel (unsigned int x, unsigned int y, unsigned int z) |
bool | markVoxelInMap (unsigned int x, unsigned int y, unsigned int z, unsigned int marked_threshold) |
void | markVoxelLine (double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length=UINT_MAX) |
void | printColumnGrid () |
void | printVoxelGrid () |
template<class ActionType > | |
void | raytraceLine (ActionType at, double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length=UINT_MAX) |
void | reset () |
void | resize (unsigned int size_x, unsigned int size_y, unsigned int size_z) |
Resizes a voxel grid to the desired size. More... | |
unsigned int | sizeX () |
unsigned int | sizeY () |
unsigned int | sizeZ () |
VoxelGrid (unsigned int size_x, unsigned int size_y, unsigned int size_z) | |
Constructor for a voxel grid. More... | |
~VoxelGrid () | |
Static Public Member Functions | |
static 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) |
static unsigned int | numBits (unsigned int n) |
Private Member Functions | |
template<class ActionType , class OffA , class OffB , class OffC > | |
void | bresenham3D (ActionType at, OffA off_a, OffB off_b, OffC off_c, unsigned int abs_da, unsigned int abs_db, unsigned int abs_dc, int error_b, int error_c, int offset_a, int offset_b, int offset_c, unsigned int &offset, unsigned int &z_mask, unsigned int max_length=UINT_MAX) |
unsigned int | max (unsigned int x, unsigned int y) |
int | sign (int i) |
Private Attributes | |
unsigned char * | costmap |
uint32_t * | data_ |
unsigned int | size_x_ |
unsigned int | size_y_ |
unsigned int | size_z_ |
Definition at line 65 of file voxel_grid.h.
VoxelGrid::VoxelGrid | ( | unsigned int | size_x, |
unsigned int | size_y, | ||
unsigned int | size_z | ||
) |
Constructor for a voxel grid.
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 |
Definition at line 42 of file voxel_grid.cpp.
VoxelGrid::~VoxelGrid | ( | ) |
Definition at line 89 of file voxel_grid.cpp.
|
inline |
Definition at line 158 of file voxel_grid.h.
|
inlineprivate |
Definition at line 283 of file voxel_grid.h.
|
inline |
Definition at line 119 of file voxel_grid.h.
|
inline |
Definition at line 130 of file voxel_grid.h.
|
inline |
Definition at line 136 of file voxel_grid.h.
void VoxelGrid::clearVoxelLine | ( | double | x0, |
double | y0, | ||
double | z0, | ||
double | x1, | ||
double | y1, | ||
double | z1, | ||
unsigned int | max_length = UINT_MAX |
||
) |
Definition at line 114 of file voxel_grid.cpp.
void VoxelGrid::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 |
||
) |
Definition at line 125 of file voxel_grid.cpp.
|
inline |
Definition at line 87 of file voxel_grid.h.
|
inlinestatic |
Definition at line 183 of file voxel_grid.h.
VoxelStatus VoxelGrid::getVoxel | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned int | z | ||
) |
Definition at line 143 of file voxel_grid.cpp.
VoxelStatus VoxelGrid::getVoxelColumn | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned int | unknown_threshold = 0 , |
||
unsigned int | marked_threshold = 0 |
||
) |
Definition at line 164 of file voxel_grid.cpp.
|
inline |
Definition at line 89 of file voxel_grid.h.
|
inline |
Definition at line 100 of file voxel_grid.h.
void VoxelGrid::markVoxelLine | ( | double | x0, |
double | y0, | ||
double | z0, | ||
double | x1, | ||
double | y1, | ||
double | z1, | ||
unsigned int | max_length = UINT_MAX |
||
) |
Definition at line 103 of file voxel_grid.cpp.
|
inlineprivate |
Definition at line 315 of file voxel_grid.h.
|
inlinestatic |
Definition at line 173 of file voxel_grid.h.
void VoxelGrid::printColumnGrid | ( | ) |
Definition at line 212 of file voxel_grid.cpp.
void VoxelGrid::printVoxelGrid | ( | ) |
Definition at line 200 of file voxel_grid.cpp.
|
inline |
Definition at line 227 of file voxel_grid.h.
void VoxelGrid::reset | ( | ) |
Definition at line 94 of file voxel_grid.cpp.
void VoxelGrid::resize | ( | unsigned int | size_x, |
unsigned int | size_y, | ||
unsigned int | size_z | ||
) |
Resizes a voxel grid to the desired size.
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 |
Definition at line 62 of file voxel_grid.cpp.
|
inlineprivate |
Definition at line 310 of file voxel_grid.h.
unsigned int VoxelGrid::sizeX | ( | ) |
Definition at line 188 of file voxel_grid.cpp.
unsigned int VoxelGrid::sizeY | ( | ) |
Definition at line 192 of file voxel_grid.cpp.
unsigned int VoxelGrid::sizeZ | ( | ) |
Definition at line 196 of file voxel_grid.cpp.
|
private |
Definition at line 322 of file voxel_grid.h.
|
private |
Definition at line 321 of file voxel_grid.h.
|
private |
Definition at line 320 of file voxel_grid.h.
|
private |
Definition at line 320 of file voxel_grid.h.
|
private |
Definition at line 320 of file voxel_grid.h.