Class OcTreeDrawer
Defined in File OcTreeDrawer.h
Inheritance Relationships
Base Type
public octomap::SceneObject
(Class SceneObject)
Derived Type
public octomap::ColorOcTreeDrawer
(Class ColorOcTreeDrawer)
Class Documentation
-
class OcTreeDrawer : public octomap::SceneObject
Subclassed by octomap::ColorOcTreeDrawer
Public Functions
-
OcTreeDrawer()
-
virtual ~OcTreeDrawer()
-
virtual void clear()
Clears the object’s representation (will be called when it gets invalid)
-
virtual void draw() const
Actual draw function which will be called to visualize the object
-
inline void setOcTree(const AbstractOcTree &octree)
sets a new OcTree that should be drawn by this drawer
-
virtual void setOcTree(const AbstractOcTree &octree, const octomap::pose6d &origin, int map_id_)
sets a new OcTree that should be drawn by this drawer origin specifies a global transformation that should be applied
-
void setOcTreeSelection(const std::list<octomap::OcTreeVolume> &selectedPoints)
sets a new selection of the current OcTree to be drawn
-
void clearOcTreeSelection()
clear the visualization of the OcTree selection
-
void setAlphaOccupied(double alpha)
sets alpha level for occupied cells
-
inline void setAlternativeDrawing(bool flag)
-
void enableOcTree(bool enabled = true)
-
inline void enableOcTreeCells(bool enabled = true)
-
inline void enableFreespace(bool enabled = true)
-
inline void enableSelection(bool enabled = true)
-
inline void setMax_tree_depth(unsigned int max_tree_depth)
-
void setOrigin(octomap::pose6d t)
-
inline void enableAxes(bool enabled = true)
Protected Functions
-
void clearOcTreeStructure()
-
void drawOctreeGrid() const
-
void drawOccupiedVoxels() const
-
void drawFreeVoxels() const
-
void drawSelection() const
-
void drawCubes(GLfloat **cubeArray, unsigned int cubeArraySize, GLfloat *cubeColorArray = NULL) const
-
void drawAxes() const
-
void generateCubes(const std::list<octomap::OcTreeVolume> &voxels, GLfloat ***glArray, unsigned int &glArraySize, octomath::Pose6D &origin, GLfloat **glColorArray = NULL)
Initializes the OpenGL visualization for a list of OcTreeVolumes The array is cleared first, if needed rotates cubes to correct reference frame
-
void clearCubes(GLfloat ***glArray, unsigned int &glArraySize, GLfloat **glColorArray = NULL)
clear OpenGL visualization
-
void initGLArrays(const unsigned int &num_cubes, unsigned int &glArraySize, GLfloat ***glArray, GLfloat **glColorArray)
setup OpenGL arrays
-
void initCubeTemplate(const octomath::Pose6D &origin, std::vector<octomath::Vector3> &cube_template)
setup cube template
-
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
-
unsigned int setCubeColorHeightmap(const octomap::OcTreeVolume &v, const unsigned int ¤t_array_idx, GLfloat **glColorArray)
-
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)
-
void initOctreeGridVis()
Protected Attributes
-
GLfloat **m_occupiedThresArray
OpenGL representation of Octree cells (cubes)
-
unsigned int m_occupiedThresSize
-
GLfloat **m_freeThresArray
-
unsigned int m_freeThresSize
-
GLfloat **m_occupiedArray
-
unsigned int m_occupiedSize
-
GLfloat **m_freeArray
-
unsigned int m_freeSize
-
GLfloat **m_selectionArray
-
unsigned int m_selectionSize
-
GLfloat *m_occupiedThresColorArray
Color array for occupied cells (height)
-
GLfloat *m_occupiedColorArray
-
GLfloat *octree_grid_vertex_array
OpenGL representation of Octree (grid structure)
-
unsigned int octree_grid_vertex_size
-
std::list<octomap::OcTreeVolume> m_grid_voxels
-
bool m_drawOccupied
-
bool m_drawOcTreeGrid
-
bool m_drawFree
-
bool m_drawSelection
-
bool m_octree_grid_vis_initialized
-
bool m_displayAxes
-
bool m_alternativeDrawing
-
mutable bool m_update
-
unsigned int m_max_tree_depth
-
double m_alphaOccupied
-
octomap::pose6d origin
-
octomap::pose6d initial_origin
-
int map_id
-
OcTreeDrawer()