ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
export_scene.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 "reusex/geometry/BuildingComponent.hpp"
8#include "reusex/types.hpp"
9
10#include <pcl/PolygonMesh.h>
11
12#include <array>
13#include <cstdint>
14#include <map>
15#include <optional>
16#include <string>
17#include <vector>
18
19namespace reusex {
20class ProjectDB;
21}
22
23namespace reusex::io {
24
28
29 // --- Cloud ---
34 std::optional<CloudLayer> cloud;
35
36 // --- Semantic ---
42 std::string name;
43 int label_id = 0;
44 std::array<uint8_t, 3> color = {};
45 std::vector<SemanticInstance> instances;
46 };
47 std::vector<SemanticCategory> semantic;
48
49 // --- Meshes ---
50 struct MeshEntry {
51 std::string name;
52 pcl::PolygonMesh::Ptr mesh;
53 };
54 std::vector<MeshEntry> meshes;
55
56 // --- 360 Panoramas ---
57 struct PanoEntry {
58 std::string image_name;
59 std::string image_url;
60 double x = 0, y = 0, z = 0;
61 };
62 std::vector<PanoEntry> panoramas;
63
64 // --- Materials ---
66 std::string name;
67 double x = 0, y = 0, z = 0;
68 std::map<std::string, std::string> properties;
69 };
70 std::vector<MaterialEntry> materials;
71
72 // --- Building Components ---
74 std::string name;
77 double confidence = -1.0;
78 std::string notes;
79 std::map<std::string, std::string> properties;
80 };
81 std::vector<ComponentEntry> components;
82};
83
87
88} // namespace reusex::io
ComponentType
Discriminator for building component types.
ExportScene gather_export_scene(const ProjectDB &db)
Gather all exportable data from a ProjectDB.
typename Cloud::ConstPtr CloudConstPtr
Definition types.hpp:28
typename CloudN::ConstPtr CloudNConstPtr
Definition types.hpp:32
A closed 3D polygon whose vertices are coplanar.
CloudNConstPtr normals
may be nullptr
CloudConstPtr cloud
XYZRGB (always present if layer exists).
std::map< std::string, std::string > properties
std::map< std::string, std::string > properties
std::string name
designation or GUID
double z
position from linked sensor frame
double z
position from sensor frame pose
std::string image_url
empty placeholder for future
std::vector< SemanticInstance > instances
std::array< uint8_t, 3 > color
Glasbey RGB.
std::string name
e.g., "wall", "ceiling"
uint32_t instance_id
0 if no instance segmentation
Intermediate representation for exporting all project data.
std::vector< MaterialEntry > materials
std::optional< CloudLayer > cloud
std::vector< SemanticCategory > semantic
std::vector< PanoEntry > panoramas
std::vector< ComponentEntry > components
std::vector< MeshEntry > meshes