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 density voxel grids.
12 *
13 * Draws voxels as multi-colored boxes, where the proportion of each color
14 * corresponds to the proportion of the respective label.
15 */
16 class Visualizer : public voxelgrid::Visualizer<Voxel>
17 {
18
19 public:
22 const std::string& layer = "LabelDensityVoxelGrid");
23
24 virtual ~Visualizer() override;
25
26
27 /// Get the alpha.
28 float getAlpha() const;
29 /// Set the alpha. Must be in [0, 1].
30 void setAlpha(float value);
31
32
33 protected:
34 virtual bool isVisible(const VoxelVisuData& voxelVisu) const override;
35 virtual void drawVoxel(const VoxelVisuData& voxelVisu) override;
36
37
38 float alpha = 0.75;
39 };
40
41} // namespace visionx::voxelgrid::LabelDensity
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()