Visualizer.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "VoxelGrid.h"
6
8{
9
10 /**
11 * @brief Visualizer for label occupancy voxel grids.
12 *
13 * Draws occupied voxels as single colored boxes according to their label.
14 */
15 class Visualizer : public voxelgrid::Visualizer<Voxel>
16 {
17
18 public:
21 const std::string& layer = "LabelOccupancyVoxelGrid");
22
23 virtual ~Visualizer() override;
24
25
26 /// Get the alpha.
27 float getAlpha() const;
28 /// Set the alpha. Must be in [0, 1].
29 void setAlpha(float value);
30
31
32 protected:
33 virtual bool isVisible(const VoxelVisuData& voxelVisu) const override;
34 virtual void drawVoxel(const VoxelVisuData& voxelVisu) override;
35
36
37 float alpha = 0.75;
38 };
39
40} // namespace visionx::voxelgrid::LabelOccupancy
The DebugDrawerTopic wraps a DebugDrawerInterfacePrx and provides a more useful interface than the Ic...
void setAlpha(float value)
Set the alpha. Must be in [0, 1].
virtual ~Visualizer() override
Virtual destructor.
virtual void drawVoxel(const VoxelVisuData &voxelVisu) override
virtual bool isVisible(const VoxelVisuData &voxelVisu) const override
Indicate whether a voxel shall be drawn.
Visualizer for voxel grids of with voxel type VoxelT.
armarx::DebugDrawerTopic & drawer()