21#include "reusex/visualize/render_view.hpp"
38 std::array<double, 3>
min{0, 0, 0};
39 std::array<double, 3>
max{0, 0, 0};
42 void add(
double x,
double y,
double z);
43 std::array<double, 3>
center()
const;
58 std::vector<std::array<std::uint8_t, 3>>
colors;
62 std::array<std::uint8_t, 3>
invalid{0, 0, 0};
101std::vector<std::uint32_t>
lod_indices(std::size_t total, std::size_t budget,
102 std::string_view storage_order,
184 std::optional<double> height);
std::array< std::uint8_t, 3 > label_palette_color(const LabelPalette &palette, std::uint32_t label)
The colour of label in palette.
LodMethod
How a large cloud was thinned for drawing.
@ stride
every k-th point, evenly over the storage order
@ all
every point is drawn
@ morton_prefix
a prefix of a bit-reversed Morton cloud (stratified)
void 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 p...
SceneInfo populate_scene(vtkRenderer *renderer, const ProjectDB &db, const SceneOptions &opts)
Load opts' layers from db and add them to renderer.
constexpr int kUnlabeledSlot
Sentinel slots of label_palette_slot().
void apply_cut_plane(vtkRenderer *renderer, double z)
Clip every actor of renderer to the half-space below z = z.
const LabelPalette & default_label_palette()
The tokens' scale (see LabelPalette).
std::string_view to_string(Layer layer)
The canonical name of layer (the inverse of layer_from_string).
Layer
One drawable body of content in a rendered view.
@ cloud
cloud (PointXYZRGB), stored per-point colour
void clear_cut_planes(vtkRenderer *renderer)
Remove every clipping plane from renderer's actors.
std::vector< std::uint32_t > 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.
ViewPreset
How the camera is placed.
@ top
Orthographic view looking straight down (-Z), north up.
CutPlane 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,...
int 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; kI...
void install_vtk_log_bridge()
Route VTK's diagnostics into ReUseX logging, once per process (see render_view()).
constexpr int kInvalidSlot
void place_preset_camera(vtkRenderer *renderer, const CameraFraming &framing, const SceneBounds &bounds)
Place renderer's active camera for a preset view of bounds.
How a preset camera frames the scene.
double aspect
viewport width / height
double orbit_elevation_deg
ViewPreset view
never ViewPreset::explicit_camera
An explicit camera: rigid pose plus pinhole intrinsics.
A resolved horizontal cut: where the plane sits and how that was decided.
bool from_planes
floor came from the segmentation, not the bbox
double floor_z
the reference it was measured up from
double height
metres above floor_z
double z
world z of the plane
The categorical colour scale label layers are drawn with.
std::array< std::uint8_t, 3 > invalid
An out-of-contract label (core::is_out_of_contract_label: a wrapped -1).
std::vector< std::array< std::uint8_t, 3 > > colors
labels 1..N, cyclic
std::array< std::uint8_t, 3 > unlabeled
label 0 (STANDARDS §3)
Axis-aligned bounds of the geometry a scene draws.
std::array< double, 3 > center() const
std::array< double, 3 > min
std::array< double, 3 > max
double extent(int axis) const
void add(double x, double y, double z)
What populate_scene() added.
std::size_t source_points
Points in the geometry cloud (0 when no point layer was drawn).
std::vector< std::uint32_t > indices
Storage index of each point a full point actor draws (its vtk point id -> cloud index); empty when ev...
std::vector< SceneLayer > layers
The actors one layer added, so an interactive viewer can toggle it.
std::size_t points
points drawn (per point layer)
std::size_t faces
mesh faces drawn
vtkActor * coarse
Point layers only: the hidden coarse twin (SceneOptions::coarse_points), or nullptr.
std::vector< vtkActor * > actors
Every actor of the layer (one for a point layer, one per component).
std::size_t items
frustums / panoramas / components drawn
What populate_scene() draws, and how.
std::string mesh_name
Named mesh drawn by Layer::mesh.
std::array< std::uint8_t, 3 > frustum_rgb
std::size_t coarse_points
Also build a hidden coarse actor of at most this many points per point layer (0 = none),...
std::size_t max_points
Draw at most this many points per point layer (0 = all).
std::optional< LabelPalette > palette
Colours of the label layers; std::nullopt = default_label_palette().
double frustum_depth
Depth of a drawn frustum, in metres.
std::array< std::uint8_t, 3 > panorama_rgb
std::optional< InstanceHighlight > highlight
Paint one instance and dim the rest (see render_view.hpp).
std::vector< Layer > layers
Layers in draw order. Empty is an error.
std::size_t max_frustums
Frustums drawn at most; posed frames beyond it are skipped evenly.
double point_size
Point sprite size in pixels. Must be positive.
std::string cloud_name
Named geometry cloud supplying point positions for every point layer.