ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
Loading...
Searching...
No Matches
gsplat.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2026 Povl Filip Sonne-Frederiksen
2
//
3
// SPDX-License-Identifier: GPL-3.0-or-later
4
5
#pragma once
6
7
// Serving the Gaussian splats stored in a project (#322).
8
//
9
// `rux create gsplat` stores its trained model in the `.rux` project (schema
10
// v12), exactly as `rux create mesh` stores a mesh, so these routes are
11
// ordinary ProjectDB reads and follow the mesh routes shape for shape:
12
// a listing, one record, and the blob.
13
//
14
// Framework-free like the rest of gui/api.hpp: these functions take a
15
// ProjectDB and return JSON or bytes, and throw HttpError to signal failure.
16
17
#include "
gui/api.hpp
"
18
19
#include <string>
20
#include <string_view>
21
22
namespace
reusex
{
23
class
ProjectDB
;
24
}
25
26
namespace
rux::gui
{
27
34
inline
constexpr
uint64_t
kMaxGsplatBytes
= 1024ull * 1024ull * 1024ull;
35
42
nlohmann::json
gsplats_json
(
const
reusex::ProjectDB
&db,
const
Params
¶ms);
43
46
nlohmann::json
gsplat_json
(
const
reusex::ProjectDB
&db, std::string_view name);
47
52
Blob
gsplat_blob
(
const
reusex::ProjectDB
&db, std::string_view name);
53
54
}
// namespace rux::gui
api.hpp
reusex::ProjectDB
Definition
ProjectDB.hpp:43
rux::gui::Params
Already-decoded query parameters, so handlers never touch crow::request.
Definition
api.hpp:118
reusex
Definition
component_record.hpp:12
rux::gui
Definition
api.hpp:38
rux::gui::kMaxGsplatBytes
constexpr uint64_t kMaxGsplatBytes
Upper bound on a splat blob this server will serve in one response.
Definition
gsplat.hpp:34
rux::gui::gsplat_json
nlohmann::json gsplat_json(const reusex::ProjectDB &db, std::string_view name)
GET /api/v1/gsplats/{name} — one splat's metadata.
rux::gui::gsplats_json
nlohmann::json gsplats_json(const reusex::ProjectDB &db, const Params ¶ms)
GET /api/v1/gsplats — every splat stored in the project, paged.
rux::gui::gsplat_blob
Blob gsplat_blob(const reusex::ProjectDB &db, std::string_view name)
GET /api/v1/gsplats/{name}/data — the INRIA .ply bytes, verbatim.
rux::gui::Blob
A non-JSON response body (image, mesh blob).
Definition
api.hpp:100
apps
rux
include
gui
gsplat.hpp
Generated by
1.17.0