Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
voxel_grid::VoxelGrid Class Reference

#include <voxel_grid.h>

List of all members.

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.
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.
 ~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_

Detailed Description

Definition at line 65 of file voxel_grid.h.


Constructor & Destructor Documentation

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

Constructor for a voxel grid.

Parameters:
size_xThe x size of the grid
size_yThe y size of the grid
size_zThe z size of the grid, only sizes <= 16 are supported

Definition at line 42 of file voxel_grid.cpp.

Definition at line 89 of file voxel_grid.cpp.


Member Function Documentation

bool voxel_grid::VoxelGrid::bitsBelowThreshold ( unsigned int  n,
unsigned int  bit_threshold 
) [inline]

Definition at line 158 of file voxel_grid.h.

template<class ActionType , class OffA , class OffB , class OffC >
void voxel_grid::VoxelGrid::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 
) [inline, private]

Definition at line 283 of file voxel_grid.h.

void voxel_grid::VoxelGrid::clearVoxel ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) [inline]

Definition at line 119 of file voxel_grid.h.

void voxel_grid::VoxelGrid::clearVoxelColumn ( unsigned int  index) [inline]

Definition at line 130 of file voxel_grid.h.

void voxel_grid::VoxelGrid::clearVoxelInMap ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) [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.

uint32_t* voxel_grid::VoxelGrid::getData ( ) [inline]

Definition at line 87 of file voxel_grid.h.

static VoxelStatus voxel_grid::VoxelGrid::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 
) [inline, static]

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.

void voxel_grid::VoxelGrid::markVoxel ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) [inline]

Definition at line 89 of file voxel_grid.h.

bool voxel_grid::VoxelGrid::markVoxelInMap ( unsigned int  x,
unsigned int  y,
unsigned int  z,
unsigned int  marked_threshold 
) [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.

unsigned int voxel_grid::VoxelGrid::max ( unsigned int  x,
unsigned int  y 
) [inline, private]

Definition at line 315 of file voxel_grid.h.

static unsigned int voxel_grid::VoxelGrid::numBits ( unsigned int  n) [inline, static]

Definition at line 173 of file voxel_grid.h.

Definition at line 212 of file voxel_grid.cpp.

Definition at line 200 of file voxel_grid.cpp.

template<class ActionType >
void voxel_grid::VoxelGrid::raytraceLine ( ActionType  at,
double  x0,
double  y0,
double  z0,
double  x1,
double  y1,
double  z1,
unsigned int  max_length = UINT_MAX 
) [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.

Parameters:
size_xThe x size of the grid
size_yThe y size of the grid
size_zThe z size of the grid, only sizes <= 16 are supported

Definition at line 62 of file voxel_grid.cpp.

int voxel_grid::VoxelGrid::sign ( int  i) [inline, private]

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.


Member Data Documentation

unsigned char* voxel_grid::VoxelGrid::costmap [private]

Definition at line 322 of file voxel_grid.h.

uint32_t* voxel_grid::VoxelGrid::data_ [private]

Definition at line 321 of file voxel_grid.h.

unsigned int voxel_grid::VoxelGrid::size_x_ [private]

Definition at line 320 of file voxel_grid.h.

unsigned int voxel_grid::VoxelGrid::size_y_ [private]

Definition at line 320 of file voxel_grid.h.

unsigned int voxel_grid::VoxelGrid::size_z_ [private]

Definition at line 320 of file voxel_grid.h.


The documentation for this class was generated from the following files:


voxel_grid
Author(s): Eitan Marder-Eppstein, Eric Berger, contradict@gmail.com
autogenerated on Wed Aug 2 2017 03:12:18