|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
Classes | |
| struct | Blob |
| A non-JSON response body (image, mesh blob). More... | |
| struct | Endpoint |
| One row of the route table. More... | |
| class | HttpError |
| Thrown by a handler to produce a non-200 JSON error response. More... | |
| struct | ImageResponse |
| An encoded image plus the provenance of any rendering applied to it. More... | |
| struct | JobSubmission |
| A validated POST /jobs body. More... | |
| struct | LodSelection |
| The outcome of a voxel selection over one whole cloud. More... | |
| struct | PageRequest |
| A validated, clamped offset/limit window over a collection. More... | |
| struct | PageWindow |
| The half-open [first, last) index range a page covers, plus the size of the collection it was taken from. More... | |
| class | Params |
| Already-decoded query parameters, so handlers never touch crow::request. More... | |
| struct | PointsResponse |
| One points-endpoint response. More... | |
| class | Server |
| Crow-backed implementation of the GUI API contract. More... | |
| struct | ServerOptions |
| Everything rux gui needs to stand a server up. More... | |
| struct | ValueRange |
| Range of the valid stored values a normalize=true rendering mapped. More... | |
Enumerations | |
| enum class | RuxpType : uint8_t { f32 = 1 , u8 = 2 , u32 = 3 } |
| Field value types, as written into a descriptor's type byte. More... | |
Functions | |
| const std::vector< Endpoint > & | endpoint_table () |
| Every endpoint this server serves, in documentation order. | |
| PageRequest | parse_page_request (const Params ¶ms, long long default_limit, long long max_limit) |
| Parse and clamp offset/limit for a paged collection. | |
| PageWindow | page_window (const PageRequest &page, size_t total) |
Clamp page onto a collection of total items. | |
| void | add_page_envelope (nlohmann::json &object, const PageWindow &window) |
| Add the shared offset/count/total envelope to a collection response. | |
| nlohmann::json | error_json (int status, std::string_view message) |
| nlohmann::json | health_json (const reusex::ProjectDB *db, const std::filesystem::path &project) |
| nlohmann::json | endpoints_json () |
| nlohmann::json | project_summary_json (const reusex::ProjectDB &db) |
| The dashboard payload. | |
| nlohmann::json | projects_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | clouds_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | cloud_json (const reusex::ProjectDB &db, const std::string &name) |
| nlohmann::json | cloud_labels_json (const reusex::ProjectDB &db, const std::string &name) |
| Label id → name for one cloud, as {"labels": {...}}. | |
| nlohmann::json | cloud_points_json (const reusex::ProjectDB &db, const std::string &name, const Params ¶ms) |
| One page of point data as JSON, ignoring format. | |
| PointsResponse | cloud_points (const reusex::ProjectDB &db, const std::string &name, const Params ¶ms) |
| Serve one page of point data in the requested wire format. | |
| nlohmann::json | meshes_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | mesh_json (const reusex::ProjectDB &db, const std::string &name) |
| nlohmann::json | mesh_textures_json (const reusex::ProjectDB &db, const std::string &name) |
| Blob | mesh_data_blob (const reusex::ProjectDB &db, const std::string &name) |
| Blob | mesh_texture_blob (const reusex::ProjectDB &db, const std::string &name, const std::string &texture) |
| nlohmann::json | frames_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | frame_json (const reusex::ProjectDB &db, int id) |
| ImageResponse | frame_image (const reusex::ProjectDB &db, int id, const Params ¶ms) |
| One of a frame's images, encoded as PNG. | |
| nlohmann::json | panoramas_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | panorama_json (const reusex::ProjectDB &db, int id) |
| Blob | panorama_image_blob (const reusex::ProjectDB &db, int id, const Params ¶ms) |
| The equirectangular image, JPEG-encoded. | |
| nlohmann::json | components_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | component_json (const reusex::ProjectDB &db, const std::string &name) |
| nlohmann::json | materials_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | material_json (const reusex::ProjectDB &db, const std::string &guid) |
| nlohmann::json | instances_json (const reusex::ProjectDB &db, const std::string &cloud, const Params ¶ms) |
| nlohmann::json | stages_json (const reusex::ProjectDB &db) |
| nlohmann::json | stage_validation_json (const reusex::ProjectDB &db, const std::string &stage) |
| Input-contract validation for a single stage. | |
| nlohmann::json | pipeline_log_json (const reusex::ProjectDB &db, const Params ¶ms) |
| nlohmann::json | job_json (const reusex::pipeline::JobRecord &record, std::string_view project) |
| nlohmann::json | jobs_json (const std::vector< reusex::pipeline::JobRecord > &jobs, std::string_view project) |
| Every supplied job, unpaged, as {"jobs": [...]}. | |
| nlohmann::json | jobs_page_json (const std::vector< reusex::pipeline::JobRecord > &jobs, std::string_view project, const Params ¶ms) |
| GET /jobs: one page of the job store, with the shared envelope. | |
| nlohmann::json | job_event_json (const reusex::pipeline::JobEvent &event, std::string_view project) |
| nlohmann::json | hello_json (const std::vector< reusex::pipeline::JobRecord > &jobs, const std::filesystem::path &project) |
| JobSubmission | parse_job_request (std::string_view body) |
| Parse and validate a job submission body. | |
| void | check_job_project (const JobSubmission &submission, std::string_view open_project) |
| Reject a submission aimed at a different project. | |
| std::optional< nlohmann::json > | handle_ws_message (std::string_view body, const std::function< void(std::optional< std::string >)> &subscribe) |
| Handle one client message on the WebSocket channel. | |
| bool | event_matches_subscription (const reusex::pipeline::JobEvent &event, const std::optional< std::string > &subscription) |
True when event should be delivered to a connection filtered to subscription (nullopt = unfiltered, receives everything). | |
| std::filesystem::path | resolve_asset_dir (const std::filesystem::path &override_dir) |
| Locate the frontend asset directory, in precedence order: | |
| std::filesystem::path | executable_dir () |
| Directory of the running executable, or an empty path if it cannot be determined. | |
| std::string | percent_decode (std::string_view text) |
| Percent-decode a URL path component ("%2e%2e" -> ".."). | |
| std::filesystem::path | resolve_asset (const std::filesystem::path &root, std::string_view url_path) |
Map a request path onto a file inside root. | |
| bool | looks_like_spa_route (std::string_view url_path) |
| True when a path looks like a client-side route rather than a missing file. | |
| std::string | mime_type_for (const std::filesystem::path &path) |
| Content type for a file, by extension. | |
| std::string | placeholder_page (std::string_view project_name) |
| The built-in landing page served when no asset bundle is installed. | |
| std::vector< uint8_t > | encode_ruxp (const reusex::ProjectDB::CloudPage &page, uint32_t flags=0) |
| Encode one stored page as a RUXP v1 buffer. | |
| bool | ruxp_supports (std::string_view point_type) |
True when type is one encode_ruxp() knows how to lay out. | |
| nlohmann::json | patch_cloud_labels (reusex::ProjectDB &db, const std::string &name, const std::string &body) |
| Rename label classes of one Label cloud. | |
| nlohmann::json | patch_material (reusex::ProjectDB &db, const std::string &guid, const std::string &body) |
| Add, change or clear properties of one material passport. | |
| nlohmann::json | gsplats_json (const reusex::ProjectDB &db, const Params ¶ms) |
| GET /api/v1/gsplats — every splat stored in the project, paged. | |
| nlohmann::json | gsplat_json (const reusex::ProjectDB &db, std::string_view name) |
| GET /api/v1/gsplats/{name} — one splat's metadata. | |
| Blob | gsplat_blob (const reusex::ProjectDB &db, std::string_view name) |
| GET /api/v1/gsplats/{name}/data — the INRIA .ply bytes, verbatim. | |
| bool | lod_supports (std::string_view point_type) |
True when point_type carries the xyz positions the grid bins. | |
| LodSelection | voxel_lod (const reusex::ProjectDB &db, std::string_view name, uint64_t max_points) |
| Select a spatially representative subset of a whole cloud. | |
| reusex::ProjectDB::CloudPage | gather_points (const reusex::ProjectDB &db, std::string_view name, const std::vector< uint64_t > &indices) |
Read the records of name at indices, as one page. | |
Variables | |
| constexpr std::string_view | kApiVersion = "1.0.0" |
| Contract version served under kApiPrefix. | |
| constexpr std::string_view | kApiPrefix = "/api/v1" |
| constexpr std::string_view | kImplementation = "rux-gui" |
| Identifies which implementation of the contract is answering. | |
| constexpr size_t | kMaxPointsPerPage = 1000000 |
| Upper bound on limit for the paged points endpoint, so a stray query cannot ask the server to materialize an unbounded response. | |
| constexpr size_t | kDefaultPointsPerPage = 100000 |
| constexpr int | kMaxLogEntries = 1000 |
| Upper bound on limit for the pipeline-log endpoint. | |
| constexpr int | kDefaultLogEntries = 100 |
| constexpr int | kMaxCollectionItems = 1000 |
| Upper bound on limit for the ordinary object collections (clouds, meshes, panoramas, components, materials, instances, jobs, project records). | |
| constexpr int | kMaxFrameIds = 10000 |
| Upper bound on limit for the sensor-frame id list. | |
| constexpr int | kMaxImageSize = 4096 |
| Upper bound on the max_size image parameter. | |
| constexpr int | kWriteLockTimeoutMs = 250 |
| How long a mutating request waits for the project's writer lock before answering 503. | |
| constexpr uint16_t | kRuxpVersion = 1 |
| Format version written into every page. | |
| constexpr size_t | kRuxpHeaderBase = 40 |
| Fixed part of the header, before the field descriptors. | |
| constexpr size_t | kRuxpFieldSize = 16 |
| Bytes per field descriptor. | |
| constexpr uint32_t | kRuxpFlagLod = 0x1U |
| flags bit 0 — this page is a level-of-detail view of the whole cloud rather than a contiguous window of it (#320). | |
| constexpr uint32_t | kRuxpKnownFlags = kRuxpFlagLod |
| Every flag bit this encoder will emit. | |
| constexpr uint64_t | kMaxGsplatBytes = 1024ull * 1024ull * 1024ull |
| Upper bound on a splat blob this server will serve in one response. | |
| constexpr uint64_t | kLodStreamChunk = 262144 |
| Points read from storage per streaming step while selecting. | |
|
strong |
Field value types, as written into a descriptor's type byte.
| Enumerator | |
|---|---|
| f32 | |
| u8 | |
| u32 | |
Definition at line 55 of file binary_points.hpp.
| void rux::gui::add_page_envelope | ( | nlohmann::json & | object, |
| const PageWindow & | window ) |
Add the shared offset/count/total envelope to a collection response.
Every paged collection carries these three fields under exactly these names, so a client writes its "is there more?" logic once (docs/gui/openapi.yaml, schema Page).
| void rux::gui::check_job_project | ( | const JobSubmission & | submission, |
| std::string_view | open_project ) |
Reject a submission aimed at a different project.
| HttpError(409) | when submission names a project that is not open_project. |
| nlohmann::json rux::gui::cloud_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | name ) |
| nlohmann::json rux::gui::cloud_labels_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | name ) |
Label id → name for one cloud, as {"labels": {...}}.
Id 0 is never included: it means unlabeled (STANDARDS §3).
| PointsResponse rux::gui::cloud_points | ( | const reusex::ProjectDB & | db, |
| const std::string & | name, | ||
| const Params & | params ) |
Serve one page of point data in the requested wire format.
| HttpError(404) | for an unknown cloud, HttpError(400) for a format other than json|binary or a malformed offset/limit. |
| nlohmann::json rux::gui::cloud_points_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | name, | ||
| const Params & | params ) |
One page of point data as JSON, ignoring format.
Backed by ProjectDB::point_cloud_page(), so it reads only the bytes the page occupies. Use cloud_points() to serve the endpoint — this is the format=json half of it.
With max_points (#320) the answer is instead a voxel-subsampled view of the whole cloud, and the body carries lod (and voxel_size when it is true). max_points is mutually exclusive with offset/limit; see docs/gui/binary-points.md § "Level of detail".
| HttpError(404) | when name is not a stored cloud, HttpError(400) on a malformed offset/limit/max_points, on max_points combined with offset/limit, or on a max_points request against a cloud with no positions and no usable lod_source. |
| nlohmann::json rux::gui::clouds_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| nlohmann::json rux::gui::component_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | name ) |
| nlohmann::json rux::gui::components_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| std::vector< uint8_t > rux::gui::encode_ruxp | ( | const reusex::ProjectDB::CloudPage & | page, |
| uint32_t | flags = 0 ) |
Encode one stored page as a RUXP v1 buffer.
Produces the 40-byte header, 16 * field_count bytes of descriptors, and then one tightly packed little-endian section per field, in descriptor order. Header integers are written byte-by-byte so the output is byte-identical regardless of host endianness (the payload is not — see the Endianness section of docs/gui/binary-points.md, which makes little-endian a deliberate constraint of the format).
A page with count == 0 still yields a complete, valid header.
| flags | Bits to write into the header's flags word — today only kRuxpFlagLod. A client rejects a page carrying a bit it does not know, so a bit must never be set speculatively. |
| std::runtime_error | when the page's point_type has no RUXP field mapping, when its data is shorter than count * point_step, or when flags contains a bit outside kRuxpKnownFlags. |
| const std::vector< Endpoint > & rux::gui::endpoint_table | ( | ) |
Every endpoint this server serves, in documentation order.
| nlohmann::json rux::gui::endpoints_json | ( | ) |
| nlohmann::json rux::gui::error_json | ( | int | status, |
| std::string_view | message ) |
| bool rux::gui::event_matches_subscription | ( | const reusex::pipeline::JobEvent & | event, |
| const std::optional< std::string > & | subscription ) |
True when event should be delivered to a connection filtered to subscription (nullopt = unfiltered, receives everything).
| std::filesystem::path rux::gui::executable_dir | ( | ) |
Directory of the running executable, or an empty path if it cannot be determined.
| ImageResponse rux::gui::frame_image | ( | const reusex::ProjectDB & | db, |
| int | id, | ||
| const Params & | params ) |
One of a frame's images, encoded as PNG.
| params | kind (color|depth|confidence|segmentation), max_size (longest edge, downscale only) and normalize (render for display rather than for measurement). |
| nlohmann::json rux::gui::frame_json | ( | const reusex::ProjectDB & | db, |
| int | id ) |
| nlohmann::json rux::gui::frames_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| params | segmented filters the id list; see docs/gui/openapi.yaml. |
| reusex::ProjectDB::CloudPage rux::gui::gather_points | ( | const reusex::ProjectDB & | db, |
| std::string_view | name, | ||
| const std::vector< uint64_t > & | indices ) |
Read the records of name at indices, as one page.
The sibling half of a LOD: indices comes from voxel_lod() over a geometry cloud, and this pulls the same point positions out of an index-aligned cloud (docs/CONTRACTS.md, STANDARDS §3.2) so the two pages can still be zipped positionally.
Streams the cloud in kLodStreamChunk windows and picks the wanted records out as they go by, so this is one sequential pass and O(indices) memory — not one blob open per index.
| indices | Ascending, unique, all < total of name. |
| std::runtime_error | when name is not a stored cloud, or when an index is out of range (which means the two clouds are not index-aligned and the caller asked for something meaningless). |
| Blob rux::gui::gsplat_blob | ( | const reusex::ProjectDB & | db, |
| std::string_view | name ) |
GET /api/v1/gsplats/{name}/data — the INRIA .ply bytes, verbatim.
| HttpError(404) | when no splat is stored under name. |
| HttpError(413) | when it exceeds kMaxGsplatBytes. |
| nlohmann::json rux::gui::gsplat_json | ( | const reusex::ProjectDB & | db, |
| std::string_view | name ) |
GET /api/v1/gsplats/{name} — one splat's metadata.
| HttpError(404) | when no splat is stored under name. |
| nlohmann::json rux::gui::gsplats_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
GET /api/v1/gsplats — every splat stored in the project, paged.
Metadata only. The byte_size in each row is what makes the client's decision informed: unlike a cloud, which streams in pages, a splat is one response of hundreds of megabytes, so the viewport does not fetch it until the user switches the layer on.
| std::optional< nlohmann::json > rux::gui::handle_ws_message | ( | std::string_view | body, |
| const std::function< void(std::optional< std::string >)> & | subscribe ) |
Handle one client message on the WebSocket channel.
| body | the raw text frame |
| subscribe | called with the requested filter when the message is a subscribe (nullopt clears the filter) |
| nlohmann::json rux::gui::health_json | ( | const reusex::ProjectDB * | db, |
| const std::filesystem::path & | project ) |
| db | nullptr when the project could not be opened; the response then reports project.open == false instead of failing outright, so a browser pointed at a broken project still gets a usable page. |
| nlohmann::json rux::gui::hello_json | ( | const std::vector< reusex::pipeline::JobRecord > & | jobs, |
| const std::filesystem::path & | project ) |
| nlohmann::json rux::gui::instances_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | cloud, | ||
| const Params & | params ) |
| nlohmann::json rux::gui::job_event_json | ( | const reusex::pipeline::JobEvent & | event, |
| std::string_view | project ) |
| nlohmann::json rux::gui::job_json | ( | const reusex::pipeline::JobRecord & | record, |
| std::string_view | project ) |
| project | Name of the project the job belongs to. Present on every job and event so a client that later talks to a multi- project ruxd (Phase 6) does not need a new message shape. |
| nlohmann::json rux::gui::jobs_json | ( | const std::vector< reusex::pipeline::JobRecord > & | jobs, |
| std::string_view | project ) |
Every supplied job, unpaged, as {"jobs": [...]}.
The WebSocket hello frame uses this: it is a snapshot of the whole store (which is itself bounded — see JobRunner), not a page of a collection, and giving it a page envelope would invite a client to try to walk it.
| nlohmann::json rux::gui::jobs_page_json | ( | const std::vector< reusex::pipeline::JobRecord > & | jobs, |
| std::string_view | project, | ||
| const Params & | params ) |
GET /jobs: one page of the job store, with the shared envelope.
| bool rux::gui::lod_supports | ( | std::string_view | point_type | ) |
True when point_type carries the xyz positions the grid bins.
Normal and Label clouds do not: a LOD of them is only meaningful relative to the geometry cloud they are index-aligned with.
| bool rux::gui::looks_like_spa_route | ( | std::string_view | url_path | ) |
True when a path looks like a client-side route rather than a missing file.
Used to decide whether the SPA index.html fallback applies. A path whose last segment carries an extension (/assets/app.js) is a file request and must 404; an extensionless one (/projects/42) is the router's business.
| nlohmann::json rux::gui::material_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | guid ) |
| nlohmann::json rux::gui::materials_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| Blob rux::gui::mesh_data_blob | ( | const reusex::ProjectDB & | db, |
| const std::string & | name ) |
| nlohmann::json rux::gui::mesh_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | name ) |
| Blob rux::gui::mesh_texture_blob | ( | const reusex::ProjectDB & | db, |
| const std::string & | name, | ||
| const std::string & | texture ) |
| nlohmann::json rux::gui::mesh_textures_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | name ) |
| nlohmann::json rux::gui::meshes_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| std::string rux::gui::mime_type_for | ( | const std::filesystem::path & | path | ) |
Content type for a file, by extension.
Falls back to "application/octet-stream".
| PageWindow rux::gui::page_window | ( | const PageRequest & | page, |
| size_t | total ) |
Clamp page onto a collection of total items.
| Blob rux::gui::panorama_image_blob | ( | const reusex::ProjectDB & | db, |
| int | id, | ||
| const Params & | params ) |
The equirectangular image, JPEG-encoded.
| params | max_size (longest edge, downscale only), for the thumbnail strip of a panorama picker — a stored equirect is routinely 8192x4096 and several megabytes. |
| nlohmann::json rux::gui::panorama_json | ( | const reusex::ProjectDB & | db, |
| int | id ) |
| nlohmann::json rux::gui::panoramas_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| JobSubmission rux::gui::parse_job_request | ( | std::string_view | body | ) |
Parse and validate a job submission body.
| HttpError(400) | on malformed JSON, a missing/unknown stage, or a parameters value that is not an object. |
| PageRequest rux::gui::parse_page_request | ( | const Params & | params, |
| long long | default_limit, | ||
| long long | max_limit ) |
Parse and clamp offset/limit for a paged collection.
| default_limit | limit when the parameter is absent. |
| max_limit | The server maximum. A limit of 0 requests exactly this; a larger one is clamped down to it rather than rejected, so a client may always ask for more than it expects to receive. |
| HttpError(400) | on a negative offset/limit, or a non-integer. |
| nlohmann::json rux::gui::patch_cloud_labels | ( | reusex::ProjectDB & | db, |
| const std::string & | name, | ||
| const std::string & | body ) |
Rename label classes of one Label cloud.
| body | {"labels": {"<id>": "<name>", ...}} — a sparse patch. Ids absent from it keep the names they had. |
| HttpError(404) | when name is not a cloud in this project. |
| HttpError(400) | on a malformed body, an empty name, or an id that is not already in the legend — this renames classes, it does not create them. |
| HttpError(409) | for the instances cloud, whose names encode the semantic class and instance id in a form the v10 migration and io/export_scene.cpp parse back out. |
| nlohmann::json rux::gui::patch_material | ( | reusex::ProjectDB & | db, |
| const std::string & | guid, | ||
| const std::string & | body ) |
Add, change or clear properties of one material passport.
| body | {"properties": {"<name>": "<value>"|null, ...}} — a sparse patch; null deletes. Properties absent from it are untouched. |
| HttpError(404) | when no passport carries guid. |
| HttpError(400) | on a malformed body, an empty property name, or a value that is neither a string nor null. |
| std::string rux::gui::percent_decode | ( | std::string_view | text | ) |
Percent-decode a URL path component ("%2e%2e" -> "..").
Applied before the traversal check, because a check that runs on the raw text is trivially defeated by encoding the dots. Invalid escapes are left verbatim rather than dropped, so nothing silently changes meaning.
| nlohmann::json rux::gui::pipeline_log_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| std::string rux::gui::placeholder_page | ( | std::string_view | project_name | ) |
| nlohmann::json rux::gui::project_summary_json | ( | const reusex::ProjectDB & | db | ) |
The dashboard payload.
Deliberately NOT paged: it is one object describing a project, not a collection, and a client that had to page it would be making several requests to answer the one question it exists to answer.
| nlohmann::json rux::gui::projects_json | ( | const reusex::ProjectDB & | db, |
| const Params & | params ) |
| std::filesystem::path rux::gui::resolve_asset | ( | const std::filesystem::path & | root, |
| std::string_view | url_path ) |
Map a request path onto a file inside root.
Returns an empty path when the resolved location escapes root (via .., percent-encoded .., a symlink, or an absolute component) or does not name an existing regular file. A request for "/" resolves to index.html.
| std::filesystem::path rux::gui::resolve_asset_dir | ( | const std::filesystem::path & | override_dir | ) |
Locate the frontend asset directory, in precedence order:
override_dir, when non-empty (from --assets)| std::runtime_error | when override_dir is given but is not a directory — an explicit flag that silently does nothing would be a silent failure (STANDARDS §5). |
| bool rux::gui::ruxp_supports | ( | std::string_view | point_type | ) |
True when type is one encode_ruxp() knows how to lay out.
| nlohmann::json rux::gui::stage_validation_json | ( | const reusex::ProjectDB & | db, |
| const std::string & | stage ) |
Input-contract validation for a single stage.
Same record shape as one element of stages_json(), so a client refreshing one card after a run does not have to reconcile two schemas.
| HttpError(404) | when stage is not in the catalogue. |
| nlohmann::json rux::gui::stages_json | ( | const reusex::ProjectDB & | db | ) |
| LodSelection rux::gui::voxel_lod | ( | const reusex::ProjectDB & | db, |
| std::string_view | name, | ||
| uint64_t | max_points ) |
Select a spatially representative subset of a whole cloud.
One streaming pass over the cloud's stored records, keeping the lowest-indexed point of each occupied voxel. When the kept set would exceed max_points the grid is coarsened — the voxel edge doubles, which maps every key onto its parent by an arithmetic shift, so the already-kept set is merged in place rather than re-read. The scan therefore never rewinds, and peak memory is O(max_points), not O(cloud).
Guarantees. page.count <= max_points always. The result is deterministic: the representative of a voxel is its lowest storage index, the output is sorted by that index, and nothing depends on hash order (STANDARDS §6).
Not guaranteed. The count is not close to max_points from below. The grid is dyadic, so one coarsening step drops the count of a surface-like cloud by roughly 4×; a result may legitimately land anywhere in (max_points/4, max_points]. Hitting a budget exactly is what a precomputed progressive ordering would buy — see the design note in docs/gui/binary-points.md.
| max_points | Budget, >= 1. The caller clamps it to the server maximum. |
| std::runtime_error | when name is not a stored cloud, when its type has no positions (lod_supports), or when max_points is 0. |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Points read from storage per streaming step while selecting.
The cloud is walked in windows of this size rather than read whole, so the scan costs a fixed ~4 MB of buffer (at the 16-byte PointXYZRGB stride) regardless of how large the cloud is.
Definition at line 34 of file point_lod.hpp.
|
inlineconstexpr |
Upper bound on limit for the ordinary object collections (clouds, meshes, panoramas, components, materials, instances, jobs, project records).
These are counted in the hundreds at worst, so the cap is about bounding the response rather than about forcing anyone to page.
|
inlineconstexpr |
|
inlineconstexpr |
Upper bound on a splat blob this server will serve in one response.
The body is materialized in memory (as the mesh-blob route already is), so this is a real ceiling rather than a formality: 1 GiB is roughly four million Gaussians at spherical-harmonic degree 3. Past it the honest answer is 413 rather than an out-of-memory server.
Definition at line 34 of file gsplat.hpp.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Bytes per field descriptor.
Definition at line 37 of file binary_points.hpp.
|
inlineconstexpr |
flags bit 0 — this page is a level-of-detail view of the whole cloud rather than a contiguous window of it (#320).
When set, count points were drawn from all total of them, offset is 0 and carries no meaning, and the page must not be zipped positionally against a page that does not come from the same selection. The layout is unchanged, which is why this is a flag and not a version: a reader that predates it refuses the page (v1's rule for an unknown flag), and it only ever reaches a reader that asked for it with max_points.
Definition at line 48 of file binary_points.hpp.
|
inlineconstexpr |
Fixed part of the header, before the field descriptors.
Definition at line 35 of file binary_points.hpp.
|
inlineconstexpr |
Every flag bit this encoder will emit.
Anything else is a programming error, not a wire condition.
Definition at line 52 of file binary_points.hpp.
|
inlineconstexpr |
Format version written into every page.
Bump only when the layout changes; a client that sees a version it does not know must refuse the page.
Definition at line 32 of file binary_points.hpp.
|
inlineconstexpr |