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 62 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_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 39 of file voxel_grid.cpp.

VoxelGrid::~VoxelGrid (  ) 

Definition at line 86 of file voxel_grid.cpp.


Member Function Documentation

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

Definition at line 143 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 257 of file voxel_grid.h.

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

Definition at line 111 of file voxel_grid.h.

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

Definition at line 120 of file voxel_grid.h.

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

Definition at line 125 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 111 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 122 of file voxel_grid.cpp.

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

Definition at line 83 of file voxel_grid.h.

VoxelStatus VoxelGrid::getVoxel ( unsigned int  x,
unsigned int  y,
unsigned int  z 
)

Definition at line 140 of file voxel_grid.cpp.

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 163 of file voxel_grid.h.

VoxelStatus VoxelGrid::getVoxelColumn ( unsigned int  x,
unsigned int  y,
unsigned int  unknown_threshold = 0,
unsigned int  marked_threshold = 0 
)

Definition at line 161 of file voxel_grid.cpp.

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

Definition at line 85 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 94 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 100 of file voxel_grid.cpp.

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

Definition at line 283 of file voxel_grid.h.

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

Definition at line 154 of file voxel_grid.h.

void VoxelGrid::printColumnGrid (  ) 

Definition at line 209 of file voxel_grid.cpp.

void VoxelGrid::printVoxelGrid (  ) 

Definition at line 197 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 202 of file voxel_grid.h.

void VoxelGrid::reset (  ) 

Definition at line 91 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_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 59 of file voxel_grid.cpp.

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

Definition at line 279 of file voxel_grid.h.

unsigned int VoxelGrid::sizeX (  ) 

Definition at line 185 of file voxel_grid.cpp.

unsigned int VoxelGrid::sizeY (  ) 

Definition at line 189 of file voxel_grid.cpp.

unsigned int VoxelGrid::sizeZ (  ) 

Definition at line 193 of file voxel_grid.cpp.


Member Data Documentation

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

Definition at line 289 of file voxel_grid.h.

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

Definition at line 288 of file voxel_grid.h.

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

Definition at line 287 of file voxel_grid.h.

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

Definition at line 287 of file voxel_grid.h.

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

Definition at line 287 of file voxel_grid.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator


voxel_grid
Author(s): Eitan Marder-Eppstein, Eric Berger
autogenerated on Fri Jan 11 10:10:07 2013