99 std::array<double, 16>
pose{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
190 using std::runtime_error::runtime_error;
This machine cannot create an offscreen OpenGL context (#313).
constexpr double kHorizontalNormalZ
|n_z| above which a segmented plane counts as horizontal when looking for the floor.
cv::Mat render_view(const ProjectDB &db, const RenderOptions &opts)
Render one view of db to an image.
std::optional< Layer > layer_from_string(std::string_view name)
Parse a layer name as accepted by rux render --layers.
const std::vector< Layer > & all_layers()
Every layer, in draw order — the vocabulary --layers accepts.
std::string_view to_string(Layer layer)
The canonical name of layer (the inverse of layer_from_string).
constexpr double kDefaultCutBboxFraction
Fallback cut height when no floor plane is available, as a fraction of the scene's vertical extent.
Layer
One drawable body of content in a rendered view.
@ mesh
a stored mesh from the meshes table
@ labels
labels (Label) — semantic classes
@ components
building-component outlines (windows / doors / walls)
@ instances
instances (Label) — spatial instances
@ cloud
cloud (PointXYZRGB), stored per-point colour
@ planes
planes (Label) — planar segments
@ rooms
rooms (Label) — room partition
ViewPreset
How the camera is placed.
@ orbit
Perspective view on a ring around the scene; see RenderOptions::orbit_index / orbit_count / orbit_ele...
@ plan
A true floor plan: ViewPreset::top plus a horizontal cut (#306).
@ explicit_camera
Use RenderOptions::camera verbatim.
@ top
Orthographic view looking straight down (-Z), north up.
@ front
Orthographic elevation looking along +Y.
std::optional< ViewPreset > view_preset_from_string(std::string_view name)
Parse a bare view-preset name.
constexpr double kDefaultCutHeightM
Default height of the plan cut above the detected floor, in metres.
CameraSpec camera_from_sensor_frame(const ProjectDB &db, int node_id, int width, int height)
Build the camera that reproduces a stored sensor frame's viewpoint.
An explicit camera: rigid pose plus pinhole intrinsics.
double fx
focal length in pixels (x)
std::array< double, 16 > pose
Row-major 4x4 camera-to-world transform.
double cy
principal point in pixels (y)
double fy
focal length in pixels (y)
double cx
principal point in pixels (x)
Everything render_view() can be told to do.
std::string cloud_name
Named geometry cloud supplying point positions for every point layer.
double point_size
Point sprite size in pixels.
double margin
Framing slack around the scene bounding box: 1.0 is a tight fit, larger pulls back,...
std::optional< double > cut_height
Height of the cut plane above the floor, in metres.
std::vector< Layer > layers
Layers to draw.
bool cut
Clip away everything above a horizontal cut plane before rendering.
double orbit_elevation_deg
Height of the orbit ring above the scene centre, in degrees.
int orbit_count
Number of viewpoints on the orbit ring (--view orbit:N).
int orbit_index
Which of the orbit_count viewpoints to render, in [0, orbit_count).
std::optional< CameraSpec > camera
Camera used when view == ViewPreset::explicit_camera.
std::string mesh_name
Named mesh drawn by Layer::mesh.
std::array< double, 3 > background
Background colour as linear RGB in [0, 1].