ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
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
22namespace rux::view {
23
24// ============================================================================
25// DATA STRUCTURES
26// ============================================================================
27
31 std::string name;
32 bool visible = true;
33};
34
36struct LoadedMesh {
37 std::variant<pcl::PolygonMesh::Ptr, pcl::TextureMesh::Ptr>
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
50 -1;
51 bool legend_visible = false;
52 std::vector<std::string> legend_ids;
53};
54
58 std::string name;
59 pcl::RGB color;
60};
61
64 pcl::PointCloud<pcl::PointXYZL>::Ptr cloud;
65 std::string db_name;
66 std::vector<LabelLegendEntry> legend_entries;
67};
68
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
reusex::CloudPtr CloudPtr
A label cloud with its associated metadata for legend display.
pcl::PointCloud< pcl::PointXYZL >::Ptr cloud
std::vector< LabelLegendEntry > legend_entries
Pre-computed at load time.
std::string db_name
Original cloud name in DB.
A single entry in the label legend overlay.
A point cloud loaded for visualization with associated metadata.
bool visible
Current visibility state.
std::string name
Display name in viewer.
CloudPtr cloud
The point cloud data.
A polygon mesh loaded for visualization with associated metadata.
bool visible
Current visibility state Check if this mesh has texture information.
std::string name
Display name in viewer.
std::variant< pcl::PolygonMesh::Ptr, pcl::TextureMesh::Ptr > mesh
The mesh data (regular or textured).
Metadata for a panoramic image (pixel data loaded on-demand).
bool pose_valid
Whether a 3D pose is available.
double pz
Position from sensor frame pose.
std::array< double, 16 > pose
Full 4x4 SE(3) row-major world pose.
int id
Database row ID.
std::string filename
Original filename.
int node_id
Linked sensor frame (-1 if unmatched).
Tracks the currently visible label overlay in the viewer.
int current_label
Index of currently shown label (-1 = none, 0-8 = label index).
std::vector< std::string > legend_ids
Shape IDs for legend text elements.
bool legend_visible
Whether the label legend is shown.