ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
Loading...
Searching...
No Matches
viewer_types.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2
//
3
// SPDX-License-Identifier: GPL-3.0-or-later
4
5
#pragma once
6
7
#include <pcl/PolygonMesh.h>
8
#include <pcl/TextureMesh.h>
9
#include <pcl/common/colors.h>
10
#include <pcl/point_cloud.h>
11
#include <pcl/point_types.h>
12
13
#include "
global-params.hpp
"
14
15
#include <reusex/geometry/BuildingComponent.hpp>
16
17
#include <array>
18
#include <string>
19
#include <variant>
20
#include <vector>
21
22
namespace
rux::view
{
23
24
// ============================================================================
25
// DATA STRUCTURES
26
// ============================================================================
27
29
struct
LoadedCloud
{
30
CloudPtr
cloud
;
31
std::string
name
;
32
bool
visible
=
true
;
33
};
34
36
struct
LoadedMesh
{
37
std::variant<pcl::PolygonMesh::Ptr, pcl::TextureMesh::Ptr>
38
mesh
;
39
std::string
name
;
40
bool
visible
=
true
;
42
bool
is_textured
()
const
{
43
return
std::holds_alternative<pcl::TextureMesh::Ptr>(
mesh
);
44
}
45
};
46
48
struct
ViewerState
{
49
int
current_label
=
50
-1;
51
bool
legend_visible
=
false
;
52
std::vector<std::string>
legend_ids
;
53
};
54
56
struct
LabelLegendEntry
{
57
int
label_id
;
58
std::string
name
;
59
pcl::RGB
color
;
60
};
61
63
struct
LabelCloudInfo
{
64
pcl::PointCloud<pcl::PointXYZL>::Ptr
cloud
;
65
std::string
db_name
;
66
std::vector<LabelLegendEntry>
legend_entries
;
67
};
68
70
struct
PanoramaInfo
{
71
int
id
;
72
std::string
filename
;
73
int
node_id
;
74
bool
pose_valid
=
false
;
75
double
px
,
py
,
pz
;
76
std::array<double, 16>
pose
;
77
};
78
79
}
// namespace rux::view
global-params.hpp
CloudPtr
reusex::CloudPtr CloudPtr
Definition
global-params.hpp:20
rux::view
Definition
component_renderer.hpp:16
rux::view::LabelCloudInfo
A label cloud with its associated metadata for legend display.
Definition
viewer_types.hpp:63
rux::view::LabelCloudInfo::cloud
pcl::PointCloud< pcl::PointXYZL >::Ptr cloud
Definition
viewer_types.hpp:64
rux::view::LabelCloudInfo::legend_entries
std::vector< LabelLegendEntry > legend_entries
Pre-computed at load time.
Definition
viewer_types.hpp:66
rux::view::LabelCloudInfo::db_name
std::string db_name
Original cloud name in DB.
Definition
viewer_types.hpp:65
rux::view::LabelLegendEntry
A single entry in the label legend overlay.
Definition
viewer_types.hpp:56
rux::view::LabelLegendEntry::color
pcl::RGB color
Definition
viewer_types.hpp:59
rux::view::LabelLegendEntry::label_id
int label_id
Definition
viewer_types.hpp:57
rux::view::LabelLegendEntry::name
std::string name
Definition
viewer_types.hpp:58
rux::view::LoadedCloud
A point cloud loaded for visualization with associated metadata.
Definition
viewer_types.hpp:29
rux::view::LoadedCloud::visible
bool visible
Current visibility state.
Definition
viewer_types.hpp:32
rux::view::LoadedCloud::name
std::string name
Display name in viewer.
Definition
viewer_types.hpp:31
rux::view::LoadedCloud::cloud
CloudPtr cloud
The point cloud data.
Definition
viewer_types.hpp:30
rux::view::LoadedMesh
A polygon mesh loaded for visualization with associated metadata.
Definition
viewer_types.hpp:36
rux::view::LoadedMesh::visible
bool visible
Current visibility state Check if this mesh has texture information.
Definition
viewer_types.hpp:40
rux::view::LoadedMesh::name
std::string name
Display name in viewer.
Definition
viewer_types.hpp:39
rux::view::LoadedMesh::is_textured
bool is_textured() const
Definition
viewer_types.hpp:42
rux::view::LoadedMesh::mesh
std::variant< pcl::PolygonMesh::Ptr, pcl::TextureMesh::Ptr > mesh
The mesh data (regular or textured).
Definition
viewer_types.hpp:38
rux::view::PanoramaInfo
Metadata for a panoramic image (pixel data loaded on-demand).
Definition
viewer_types.hpp:70
rux::view::PanoramaInfo::pose_valid
bool pose_valid
Whether a 3D pose is available.
Definition
viewer_types.hpp:74
rux::view::PanoramaInfo::py
double py
Definition
viewer_types.hpp:75
rux::view::PanoramaInfo::pz
double pz
Position from sensor frame pose.
Definition
viewer_types.hpp:75
rux::view::PanoramaInfo::pose
std::array< double, 16 > pose
Full 4x4 SE(3) row-major world pose.
Definition
viewer_types.hpp:76
rux::view::PanoramaInfo::id
int id
Database row ID.
Definition
viewer_types.hpp:71
rux::view::PanoramaInfo::px
double px
Definition
viewer_types.hpp:75
rux::view::PanoramaInfo::filename
std::string filename
Original filename.
Definition
viewer_types.hpp:72
rux::view::PanoramaInfo::node_id
int node_id
Linked sensor frame (-1 if unmatched).
Definition
viewer_types.hpp:73
rux::view::ViewerState
Tracks the currently visible label overlay in the viewer.
Definition
viewer_types.hpp:48
rux::view::ViewerState::current_label
int current_label
Index of currently shown label (-1 = none, 0-8 = label index).
Definition
viewer_types.hpp:49
rux::view::ViewerState::legend_ids
std::vector< std::string > legend_ids
Shape IDs for legend text elements.
Definition
viewer_types.hpp:52
rux::view::ViewerState::legend_visible
bool legend_visible
Whether the label legend is shown.
Definition
viewer_types.hpp:51
apps
rux
include
view
viewer_types.hpp
Generated by
1.17.0