ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
scene.hpp File Reference
#include "reusex/visualize/render_view.hpp"
#include <array>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for scene.hpp:

Go to the source code of this file.

Classes

struct  reusex::visualize::SceneBounds
 Axis-aligned bounds of the geometry a scene draws. More...
struct  reusex::visualize::LabelPalette
 The categorical colour scale label layers are drawn with. More...
struct  reusex::visualize::SceneOptions
 What populate_scene() draws, and how. More...
struct  reusex::visualize::SceneLayer
 The actors one layer added, so an interactive viewer can toggle it. More...
struct  reusex::visualize::SceneInfo
 What populate_scene() added. More...
struct  reusex::visualize::CutPlane
 A resolved horizontal cut: where the plane sits and how that was decided. More...
struct  reusex::visualize::CameraFraming
 How a preset camera frames the scene. More...

Namespaces

namespace  reusex
namespace  reusex::visualize

Enumerations

enum class  reusex::visualize::LodMethod { reusex::visualize::all , reusex::visualize::morton_prefix , reusex::visualize::stride }
 How a large cloud was thinned for drawing. More...

Functions

const LabelPalette & reusex::visualize::default_label_palette ()
 The tokens' scale (see LabelPalette).
int reusex::visualize::label_palette_slot (std::uint32_t label, std::size_t size)
 Palette slot of a point label: (label - 1) % size; kUnlabeledSlot for label 0 or an empty palette; kInvalidSlot for an out-of-contract label (a wrapped -1), which must not borrow a class's colour.
std::array< std::uint8_t, 3 > reusex::visualize::label_palette_color (const LabelPalette &palette, std::uint32_t label)
 The colour of label in palette.
std::string_view reusex::visualize::to_string (LodMethod method)
std::vector< std::uint32_t > reusex::visualize::lod_indices (std::size_t total, std::size_t budget, std::string_view storage_order, LodMethod *method=nullptr)
 Which of total stored points to draw within a budget of budget.
SceneInfo reusex::visualize::populate_scene (vtkRenderer *renderer, const ProjectDB &db, const SceneOptions &opts)
 Load opts' layers from db and add them to renderer.
CutPlane reusex::visualize::resolve_cut_plane (const ProjectDB &db, const SceneBounds &bounds, std::optional< double > height)
 Decide where to cut bounds: height (or the default) above the floor detected by rux create planes, or above the bounding box's lower face.
void reusex::visualize::apply_cut_plane (vtkRenderer *renderer, double z)
 Clip every actor of renderer to the half-space below z = z.
void reusex::visualize::clear_cut_planes (vtkRenderer *renderer)
 Remove every clipping plane from renderer's actors.
void reusex::visualize::place_preset_camera (vtkRenderer *renderer, const CameraFraming &framing, const SceneBounds &bounds)
 Place renderer's active camera for a preset view of bounds.
void reusex::visualize::place_explicit_camera (vtkRenderer *renderer, const CameraSpec &spec, int width, int height, const SceneBounds &bounds)
 Place renderer's active camera at an explicit pose + pinhole camera, for an image of width x height pixels.
void reusex::visualize::install_vtk_log_bridge ()
 Route VTK's diagnostics into ReUseX logging, once per process (see render_view()).

Variables

constexpr int reusex::visualize::kUnlabeledSlot = -1
 Sentinel slots of label_palette_slot().
constexpr int reusex::visualize::kInvalidSlot = -2