Visualizer Class Reference

Visualizer for label occupancy voxel grids. More...

#include <VisionX/libraries/VoxelGrids/LabelOccupancy/Visualizer.h>

+ Inheritance diagram for Visualizer:

Public Member Functions

float getAlpha () const
 Get the alpha.
 
void setAlpha (float value)
 Set the alpha. Must be in [0, 1].
 
 Visualizer ()
 
 Visualizer (const armarx::DebugDrawerTopic &drawer, const std::string &layer="LabelOccupancyVoxelGrid")
 
virtual ~Visualizer () override
 Virtual destructor.
 
- Public Member Functions inherited from Visualizer< Voxel >
void clearLayer ()
 Clear the layer.
 
void clearVoxelLayer (bool sleep=false)
 Clear the voxel layer.
 
void draw (const VoxelGrid< Voxel > &grid)
 Draw the voxel grid.
 
void drawBoundingEdges (const VoxelGrid< Voxel > &grid)
 Draw the bounding edges of the voxel grid.
 
void drawStructure (const VoxelGrid< Voxel > &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.
 

Protected Member Functions

virtual void drawVoxel (const VoxelVisuData &voxelVisu) override
 
virtual bool isVisible (const VoxelVisuData &voxelVisu) const override
 Indicate whether a voxel shall be drawn.
 
- Protected Member Functions inherited from Visualizer< Voxel >
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.
 

Protected Attributes

float alpha = 0.75
 

Detailed Description

Visualizer for label occupancy voxel grids.

Draws occupied voxels as single colored boxes according to their label.

Definition at line 15 of file Visualizer.h.

Constructor & Destructor Documentation

◆ Visualizer() [1/2]

Visualizer ( )
default
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Visualizer() [2/2]

Visualizer ( const armarx::DebugDrawerTopic & drawer,
const std::string & layer = "LabelOccupancyVoxelGrid" )

Definition at line 13 of file Visualizer.cpp.

+ Here is the call graph for this function:

◆ ~Visualizer()

~Visualizer ( )
overridevirtualdefault

Virtual destructor.

Reimplemented from Visualizer< Voxel >.

Member Function Documentation

◆ drawVoxel()

void drawVoxel ( const VoxelVisuData & voxelVisu)
overrideprotectedvirtual

Definition at line 27 of file Visualizer.cpp.

+ Here is the call graph for this function:

◆ getAlpha()

float getAlpha ( ) const

Get the alpha.

Definition at line 46 of file Visualizer.cpp.

◆ isVisible()

bool isVisible ( const VoxelVisuData & visu) const
overrideprotectedvirtual

Indicate whether a voxel shall be drawn.

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

Reimplemented from Visualizer< Voxel >.

Definition at line 21 of file Visualizer.cpp.

◆ setAlpha()

void setAlpha ( float value)

Set the alpha. Must be in [0, 1].

Definition at line 52 of file Visualizer.cpp.

Member Data Documentation

◆ alpha

float alpha = 0.75
protected

Definition at line 37 of file Visualizer.h.


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