Public Member Functions | Protected Member Functions | Protected Attributes
octomap::OcTreeDrawer Class Reference

#include <OcTreeDrawer.h>

Inheritance diagram for octomap::OcTreeDrawer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void clear ()
void clearOcTreeSelection ()
 clear the visualization of the OcTree selection
void draw () const
void enableAxes (bool enabled=true)
void enableFreespace (bool enabled=true)
void enableOcTree (bool enabled=true)
void enableOcTreeCells (bool enabled=true)
void enableSelection (bool enabled=true)
 OcTreeDrawer ()
void setAlphaOccupied (double alpha)
 sets alpha level for occupied cells
void setMax_tree_depth (unsigned int max_tree_depth)
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_)
void setOcTreeSelection (const std::list< octomap::OcTreeVolume > &selectedPoints)
 sets a new selection of the current OcTree to be drawn
void setOrigin (octomap::pose6d t)
virtual ~OcTreeDrawer ()

Protected Member Functions

void clearCubes (GLfloat ***glArray, unsigned int &glArraySize, GLfloat **glColorArray=NULL)
 clear OpenGL visualization
void clearOcTreeStructure ()
void drawAxes () const
void drawCubes (GLfloat **cubeArray, unsigned int cubeArraySize, GLfloat *cubeColorArray=NULL) const
void drawFreeVoxels () const
void drawOccupiedVoxels () const
void drawOctreeGrid () const
void drawSelection () const
unsigned int generateCube (const octomap::OcTreeVolume &v, const std::vector< octomath::Vector3 > &cube_template, const unsigned int &current_array_idx, GLfloat ***glArray)
 add one cube to arrays
void generateCubes (const std::list< octomap::OcTreeVolume > &voxels, GLfloat ***glArray, unsigned int &glArraySize, octomath::Pose6D &origin, GLfloat **glColorArray=NULL)
void initCubeTemplate (const octomath::Pose6D &origin, std::vector< octomath::Vector3 > &cube_template)
 setup cube template
void initGLArrays (const unsigned int &num_cubes, unsigned int &glArraySize, GLfloat ***glArray, GLfloat **glColorArray)
 setup OpenGL arrays
void initOctreeGridVis ()
unsigned int setCubeColorHeightmap (const octomap::OcTreeVolume &v, const unsigned int &current_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 &current_array_idx, GLfloat **glColorArray)

Protected Attributes

octomap::pose6d initial_origin
double m_alphaOccupied
bool m_displayAxes
bool m_drawFree
bool m_drawOccupied
bool m_drawOcTreeGrid
bool m_drawSelection
GLfloat ** m_freeArray
unsigned int m_freeSize
GLfloat ** m_freeThresArray
unsigned int m_freeThresSize
std::list< octomap::OcTreeVolumem_grid_voxels
unsigned int m_max_tree_depth
GLfloat ** m_occupiedArray
GLfloat * m_occupiedColorArray
unsigned int m_occupiedSize
GLfloat ** m_occupiedThresArray
 OpenGL representation of Octree cells (cubes)
GLfloat * m_occupiedThresColorArray
 Color array for occupied cells (height)
unsigned int m_occupiedThresSize
bool m_octree_grid_vis_initialized
GLfloat ** m_selectionArray
unsigned int m_selectionSize
int map_id
GLfloat * octree_grid_vertex_array
 OpenGL representation of Octree (grid structure)
unsigned int octree_grid_vertex_size
octomap::pose6d origin

Detailed Description

Definition at line 33 of file OcTreeDrawer.h.


Constructor & Destructor Documentation

Definition at line 32 of file OcTreeDrawer.cpp.

Definition at line 57 of file OcTreeDrawer.cpp.


Member Function Documentation

void octomap::OcTreeDrawer::clear ( ) [virtual]

Clears the object's representation (will be called when it gets invalid)

Reimplemented from octomap::SceneObject.

Definition at line 633 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::clearCubes ( GLfloat ***  glArray,
unsigned int &  glArraySize,
GLfloat **  glColorArray = NULL 
) [protected]

clear OpenGL visualization

Definition at line 458 of file OcTreeDrawer.cpp.

clear the visualization of the OcTree selection

Definition at line 215 of file OcTreeDrawer.cpp.

Definition at line 625 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::draw ( ) const [virtual]

Actual draw function which will be called to visualize the object

Implements octomap::SceneObject.

Definition at line 61 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::drawAxes ( ) const [protected]

Definition at line 839 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::drawCubes ( GLfloat **  cubeArray,
unsigned int  cubeArraySize,
GLfloat *  cubeColorArray = NULL 
) const [protected]

Definition at line 716 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::drawFreeVoxels ( ) const [protected]

Definition at line 685 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::drawOccupiedVoxels ( ) const [protected]

Definition at line 644 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::drawOctreeGrid ( ) const [protected]

Definition at line 804 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::drawSelection ( ) const [protected]

Definition at line 709 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::enableAxes ( bool  enabled = true) [inline]

Definition at line 72 of file OcTreeDrawer.h.

void octomap::OcTreeDrawer::enableFreespace ( bool  enabled = true) [inline]

Definition at line 66 of file OcTreeDrawer.h.

void octomap::OcTreeDrawer::enableOcTree ( bool  enabled = true)

Definition at line 820 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::enableOcTreeCells ( bool  enabled = true) [inline]

Definition at line 65 of file OcTreeDrawer.h.

void octomap::OcTreeDrawer::enableSelection ( bool  enabled = true) [inline]

Definition at line 67 of file OcTreeDrawer.h.

unsigned int octomap::OcTreeDrawer::generateCube ( const octomap::OcTreeVolume v,
const std::vector< octomath::Vector3 > &  cube_template,
const unsigned int &  current_array_idx,
GLfloat ***  glArray 
) [protected]

add one cube to arrays

Definition at line 272 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::generateCubes ( const std::list< octomap::OcTreeVolume > &  voxels,
GLfloat ***  glArray,
unsigned int &  glArraySize,
octomath::Pose6D origin,
GLfloat **  glColorArray = NULL 
) [protected]

Initializes the OpenGL visualization for a list of OcTreeVolumes The array is cleared first, if needed rotates cubes to correct reference frame

Definition at line 477 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::initCubeTemplate ( const octomath::Pose6D origin,
std::vector< octomath::Vector3 > &  cube_template 
) [protected]

setup cube template

Definition at line 238 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::initGLArrays ( const unsigned int &  num_cubes,
unsigned int &  glArraySize,
GLfloat ***  glArray,
GLfloat **  glColorArray 
) [protected]

setup OpenGL arrays

Definition at line 219 of file OcTreeDrawer.cpp.

Definition at line 500 of file OcTreeDrawer.cpp.

sets alpha level for occupied cells

Definition at line 105 of file OcTreeDrawer.cpp.

unsigned int octomap::OcTreeDrawer::setCubeColorHeightmap ( const octomap::OcTreeVolume v,
const unsigned int &  current_array_idx,
GLfloat **  glColorArray 
) [protected]

Definition at line 417 of file OcTreeDrawer.cpp.

unsigned int octomap::OcTreeDrawer::setCubeColorRGBA ( const unsigned char &  r,
const unsigned char &  g,
const unsigned char &  b,
const unsigned char &  a,
const unsigned int &  current_array_idx,
GLfloat **  glColorArray 
) [protected]

Definition at line 437 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::setMax_tree_depth ( unsigned int  max_tree_depth) [inline]

Definition at line 68 of file OcTreeDrawer.h.

void octomap::OcTreeDrawer::setOcTree ( const AbstractOcTree octree) [inline]

sets a new OcTree that should be drawn by this drawer

Definition at line 44 of file OcTreeDrawer.h.

void octomap::OcTreeDrawer::setOcTree ( const AbstractOcTree octree,
const octomap::pose6d origin,
int  map_id_ 
) [virtual]

sets a new OcTree that should be drawn by this drawer origin specifies a global transformation that should be applied

Reimplemented in octomap::ColorOcTreeDrawer.

Definition at line 110 of file OcTreeDrawer.cpp.

void octomap::OcTreeDrawer::setOcTreeSelection ( const std::list< octomap::OcTreeVolume > &  selectedPoints)

sets a new selection of the current OcTree to be drawn

Definition at line 211 of file OcTreeDrawer.cpp.

Definition at line 828 of file OcTreeDrawer.cpp.


Member Data Documentation

Definition at line 155 of file OcTreeDrawer.h.

Definition at line 152 of file OcTreeDrawer.h.

Definition at line 149 of file OcTreeDrawer.h.

Definition at line 146 of file OcTreeDrawer.h.

Definition at line 144 of file OcTreeDrawer.h.

Definition at line 145 of file OcTreeDrawer.h.

Definition at line 147 of file OcTreeDrawer.h.

GLfloat** octomap::OcTreeDrawer::m_freeArray [protected]

Definition at line 128 of file OcTreeDrawer.h.

unsigned int octomap::OcTreeDrawer::m_freeSize [protected]

Definition at line 129 of file OcTreeDrawer.h.

Definition at line 124 of file OcTreeDrawer.h.

unsigned int octomap::OcTreeDrawer::m_freeThresSize [protected]

Definition at line 125 of file OcTreeDrawer.h.

Definition at line 142 of file OcTreeDrawer.h.

unsigned int octomap::OcTreeDrawer::m_max_tree_depth [protected]

Definition at line 151 of file OcTreeDrawer.h.

Definition at line 126 of file OcTreeDrawer.h.

Definition at line 135 of file OcTreeDrawer.h.

unsigned int octomap::OcTreeDrawer::m_occupiedSize [protected]

Definition at line 127 of file OcTreeDrawer.h.

OpenGL representation of Octree cells (cubes)

Definition at line 122 of file OcTreeDrawer.h.

Color array for occupied cells (height)

Definition at line 134 of file OcTreeDrawer.h.

Definition at line 123 of file OcTreeDrawer.h.

Definition at line 148 of file OcTreeDrawer.h.

Definition at line 130 of file OcTreeDrawer.h.

unsigned int octomap::OcTreeDrawer::m_selectionSize [protected]

Definition at line 131 of file OcTreeDrawer.h.

Definition at line 157 of file OcTreeDrawer.h.

OpenGL representation of Octree (grid structure)

Definition at line 139 of file OcTreeDrawer.h.

Definition at line 140 of file OcTreeDrawer.h.

Definition at line 154 of file OcTreeDrawer.h.


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


octovis
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Thu Jun 6 2019 17:31:58