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.
 
void clearVoxelLayer (bool sleep=false)
 Clear the voxel layer.
 
void draw (const VoxelGrid< VoxelT > &grid)
 Draw the voxel grid.
 
void drawBoundingEdges (const VoxelGrid< VoxelT > &grid)
 Draw the bounding edges of the voxel grid.
 
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.
 
 operator bool () const
 
void setDebugDrawer (const armarx::DebugDrawerInterfacePrx &debugDrawer)
 Set the debug drawer.
 
void setLayer (const std::string &layer)
 Set the layer name.
 
 Visualizer ()
 Default constructor.
 
 Visualizer (const armarx::DebugDrawerTopic &drawer, const std::string &voxelLayer="VoxelGrid")
 Initialize with debug drawer and voxel grid.
 
virtual ~Visualizer ()
 Virtual destructor.
 

Protected Member Functions

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

Detailed Description

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

Visualizer for voxel grids of with voxel type VoxelT.

Definition at line 43 of file Visualizer.hpp.

Constructor & Destructor Documentation

◆ Visualizer() [1/2]

template<typename VT>
Visualizer ( )

Default constructor.

Definition at line 155 of file Visualizer.hpp.

◆ Visualizer() [2/2]

template<typename VT>
Visualizer ( const armarx::DebugDrawerTopic & drawer,
const std::string & voxelLayer = "VoxelGrid" )

Initialize with debug drawer and voxel grid.

Definition at line 160 of file Visualizer.hpp.

◆ ~Visualizer()

template<typename VoxelT>
virtual ~Visualizer ( )
inlinevirtual

Virtual destructor.

Reimplemented in Visualizer, and Visualizer.

Definition at line 53 of file Visualizer.hpp.

Member Function Documentation

◆ clearLayer()

template<typename VT>
void clearLayer ( )

Clear the layer.

Definition at line 171 of file Visualizer.hpp.

◆ clearVoxelLayer()

template<typename VT>
void clearVoxelLayer ( bool sleep = false)

Clear the voxel layer.

Definition at line 178 of file Visualizer.hpp.

+ Here is the call graph for this function:

◆ draw()

template<typename VoxelT>
void draw ( const VoxelGrid< VoxelT > & grid)

Draw the voxel grid.

Definition at line 399 of file Visualizer.hpp.

+ Here is the call graph for this function:

◆ drawBoundingEdges()

template<typename VoxelT>
void drawBoundingEdges ( const VoxelGrid< VoxelT > & grid)

Draw the bounding edges of the voxel grid.

Definition at line 185 of file Visualizer.hpp.

+ Here is the call graph for this function:

◆ drawer() [1/2]

template<typename VoxelT>
armarx::DebugDrawerTopic & drawer ( )
inlineprotected

Get the debug drawer.

Definition at line 124 of file Visualizer.hpp.

+ Here is the caller graph for this function:

◆ drawer() [2/2]

template<typename VoxelT>
const armarx::DebugDrawerTopic & drawer ( ) const
inlineprotected

Definition at line 130 of file Visualizer.hpp.

◆ drawStructure()

template<typename VoxelT>
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 246 of file Visualizer.hpp.

+ Here is the call graph for this function:

◆ drawVoxel()

template<typename VoxelT>
void drawVoxel ( const VoxelVisuData & visu)
protectedvirtual

Draw a voxel.

Definition at line 428 of file Visualizer.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getVoxelLayer()

template<typename VoxelT>
std::string getVoxelLayer ( ) const
inlineprotected

Get the layer name.

Definition at line 137 of file Visualizer.hpp.

+ Here is the caller graph for this function:

◆ isVisible()

template<typename VoxelT>
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 113 of file Visualizer.hpp.

+ Here is the caller graph for this function:

◆ operator bool()

template<typename VoxelT>
operator bool ( ) const
inline

Definition at line 89 of file Visualizer.hpp.

◆ setDebugDrawer()

template<typename VoxelT>
void setDebugDrawer ( const armarx::DebugDrawerInterfacePrx & debugDrawer)
inline

Set the debug drawer.

Definition at line 77 of file Visualizer.hpp.

◆ setLayer()

template<typename VoxelT>
void setLayer ( const std::string & layer)
inline

Set the layer name.

Definition at line 84 of file Visualizer.hpp.


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