Visualizer< VoxelT > Class Template Reference

Visualizer for voxel grids of with voxel type VoxelT. More...

#include <VisionX/libraries/VoxelGridCore/Visualizer.hpp>

Classes

struct  VoxelVisuData
 Information about a voxel about to-be-drawn. More...
 

Public Member Functions

void clearLayer ()
 Clear the layer. More...
 
void clearVoxelLayer (bool sleep=false)
 Clear the voxel layer. More...
 
void draw (const VoxelGrid< VoxelT > &grid)
 Draw the voxel grid. More...
 
void drawBoundingEdges (const VoxelGrid< VoxelT > &grid)
 Draw the bounding edges of the voxel grid. More...
 
void drawStructure (const VoxelGrid< VoxelT > &grid, float lineWidth=1, const armarx::DrawColor &colorEdges={0,.5, 1, 1}, const armarx::DrawColor &colorStructure={0, 1, 1, 1}, bool drawOriginVoxel=false)
 Draw the bounding edges of the voxel grid. More...
 
 operator bool () const
 
void setDebugDrawer (const armarx::DebugDrawerInterfacePrx &debugDrawer)
 Set the debug drawer. More...
 
void setLayer (const std::string &layer)
 Set the layer name. More...
 
 Visualizer ()
 Default constructor. More...
 
 Visualizer (const armarx::DebugDrawerTopic &drawer, const std::string &voxelLayer="VoxelGrid")
 Initialize with debug drawer and voxel grid. More...
 
virtual ~Visualizer ()
 Virtual destructor. More...
 

Protected Member Functions

armarx::DebugDrawerTopicdrawer ()
 Get the debug drawer. More...
 
const armarx::DebugDrawerTopicdrawer () const
 
virtual void drawVoxel (const VoxelVisuData &visu)
 Draw a voxel. More...
 
std::string getVoxelLayer () const
 Get the layer name. More...
 
virtual bool isVisible (const VoxelVisuData &visu) const
 Indicate whether a voxel shall be drawn. More...
 

Detailed Description

template<typename VoxelT>
class visionx::voxelgrid::Visualizer< VoxelT >

Visualizer for voxel grids of with voxel type VoxelT.

Definition at line 44 of file Visualizer.hpp.

Constructor & Destructor Documentation

◆ Visualizer() [1/2]

Default constructor.

Definition at line 154 of file Visualizer.hpp.

◆ Visualizer() [2/2]

Visualizer ( const armarx::DebugDrawerTopic drawer,
const std::string &  voxelLayer = "VoxelGrid" 
)

Initialize with debug drawer and voxel grid.

Definition at line 158 of file Visualizer.hpp.

◆ ~Visualizer()

virtual ~Visualizer ( )
inlinevirtual

Virtual destructor.

Reimplemented in Visualizer, and Visualizer.

Definition at line 54 of file Visualizer.hpp.

Member Function Documentation

◆ clearLayer()

void clearLayer

Clear the layer.

Definition at line 168 of file Visualizer.hpp.

+ Here is the caller graph for this function:

◆ clearVoxelLayer()

void clearVoxelLayer ( bool  sleep = false)

Clear the voxel layer.

Definition at line 174 of file Visualizer.hpp.

◆ draw()

void draw ( const VoxelGrid< VoxelT > &  grid)

Draw the voxel grid.

Definition at line 394 of file Visualizer.hpp.

◆ drawBoundingEdges()

void drawBoundingEdges ( const VoxelGrid< VoxelT > &  grid)

Draw the bounding edges of the voxel grid.

Definition at line 180 of file Visualizer.hpp.

◆ drawer() [1/2]

armarx::DebugDrawerTopic& drawer ( )
inlineprotected

Get the debug drawer.

Definition at line 122 of file Visualizer.hpp.

◆ drawer() [2/2]

const armarx::DebugDrawerTopic& drawer ( ) const
inlineprotected

Definition at line 126 of file Visualizer.hpp.

◆ drawStructure()

void drawStructure ( const VoxelGrid< VoxelT > &  grid,
float  lineWidth = 1,
const armarx::DrawColor &  colorEdges = {0, .5, 1, 1},
const armarx::DrawColor &  colorStructure = {0, 1, 1, 1},
bool  drawOriginVoxel = false 
)

Draw the bounding edges of the voxel grid.

Definition at line 241 of file Visualizer.hpp.

◆ drawVoxel()

void drawVoxel ( const VoxelVisuData visu)
protectedvirtual

Draw a voxel.

Reimplemented in Visualizer, and Visualizer.

Definition at line 417 of file Visualizer.hpp.

◆ getVoxelLayer()

std::string getVoxelLayer ( ) const
inlineprotected

Get the layer name.

Definition at line 132 of file Visualizer.hpp.

◆ isVisible()

virtual bool isVisible ( const VoxelVisuData visu) const
inlineprotectedvirtual

Indicate whether a voxel shall be drawn.

Voxels for which this method returns false are not passed to drawVoxel().

Reimplemented in Visualizer, and Visualizer.

Definition at line 112 of file Visualizer.hpp.

◆ operator bool()

operator bool ( ) const
inline

Definition at line 87 of file Visualizer.hpp.

◆ setDebugDrawer()

void setDebugDrawer ( const armarx::DebugDrawerInterfacePrx debugDrawer)
inline

Set the debug drawer.

Definition at line 77 of file Visualizer.hpp.

◆ setLayer()

void setLayer ( const std::string &  layer)
inline

Set the layer name.

Definition at line 82 of file Visualizer.hpp.


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