25 #ifndef OCTREEDRAWER_H_ 26 #define OCTREEDRAWER_H_ 81 void drawCubes(GLfloat** cubeArray,
unsigned int cubeArraySize,
82 GLfloat* cubeColorArray = NULL)
const;
89 void generateCubes(
const std::list<octomap::OcTreeVolume>& voxels,
90 GLfloat*** glArray,
unsigned int& glArraySize,
92 GLfloat** glColorArray = NULL);
95 void clearCubes(GLfloat*** glArray,
unsigned int& glArraySize,
96 GLfloat** glColorArray = NULL);
98 void initGLArrays(
const unsigned int& num_cubes,
unsigned int& glArraySize,
99 GLfloat*** glArray, GLfloat** glColorArray);
102 std::vector<octomath::Vector3>& cube_template);
105 const std::vector<octomath::Vector3>& cube_template,
106 const unsigned int& current_array_idx,
109 const unsigned int& current_array_idx,
110 GLfloat** glColorArray);
111 unsigned int setCubeColorRGBA(
const unsigned char& r,
const unsigned char& g,
112 const unsigned char& b,
const unsigned char& a,
113 const unsigned int& current_array_idx,
114 GLfloat** glColorArray);
void setOcTree(const AbstractOcTree &octree)
sets a new OcTree that should be drawn by this drawer
void enableOcTreeCells(bool enabled=true)
unsigned int setCubeColorHeightmap(const octomap::OcTreeVolume &v, const unsigned int ¤t_array_idx, GLfloat **glColorArray)
unsigned int octree_grid_vertex_size
void enableAxes(bool enabled=true)
void clearCubes(GLfloat ***glArray, unsigned int &glArraySize, GLfloat **glColorArray=NULL)
clear OpenGL visualization
GLfloat ** m_occupiedArray
GLfloat * octree_grid_vertex_array
OpenGL representation of Octree (grid structure)
void clearOcTreeSelection()
clear the visualization of the OcTree selection
void clearOcTreeStructure()
std::pair< point3d, double > OcTreeVolume
octomap::pose6d initial_origin
GLfloat * m_occupiedColorArray
void enableOcTree(bool enabled=true)
void initCubeTemplate(const octomath::Pose6D &origin, std::vector< octomath::Vector3 > &cube_template)
setup cube template
unsigned int m_max_tree_depth
void setOcTreeSelection(const std::list< octomap::OcTreeVolume > &selectedPoints)
sets a new selection of the current OcTree to be drawn
void generateCubes(const std::list< octomap::OcTreeVolume > &voxels, GLfloat ***glArray, unsigned int &glArraySize, octomath::Pose6D &origin, GLfloat **glColorArray=NULL)
GLfloat ** m_freeThresArray
void drawFreeVoxels() const
void drawOctreeGrid() const
bool m_octree_grid_vis_initialized
GLfloat ** m_occupiedThresArray
OpenGL representation of Octree cells (cubes)
unsigned int m_selectionSize
void enableFreespace(bool enabled=true)
void drawOccupiedVoxels() const
unsigned int generateCube(const octomap::OcTreeVolume &v, const std::vector< octomath::Vector3 > &cube_template, const unsigned int ¤t_array_idx, GLfloat ***glArray)
add one cube to arrays
void drawSelection() const
void initGLArrays(const unsigned int &num_cubes, unsigned int &glArraySize, GLfloat ***glArray, GLfloat **glColorArray)
setup OpenGL arrays
std::list< octomap::OcTreeVolume > m_grid_voxels
void drawCubes(GLfloat **cubeArray, unsigned int cubeArraySize, GLfloat *cubeColorArray=NULL) const
unsigned int m_occupiedThresSize
void setAlphaOccupied(double alpha)
sets alpha level for occupied cells
void setMax_tree_depth(unsigned int max_tree_depth)
unsigned int m_occupiedSize
unsigned int setCubeColorRGBA(const unsigned char &r, const unsigned char &g, const unsigned char &b, const unsigned char &a, const unsigned int ¤t_array_idx, GLfloat **glColorArray)
GLfloat ** m_selectionArray
GLfloat * m_occupiedThresColorArray
Color array for occupied cells (height)
void setOrigin(octomap::pose6d t)
unsigned int m_freeThresSize
void enableSelection(bool enabled=true)