Ui, Render & Plot
Retained interfaces, rendering, presentation, and plotting.
oa
Types
8 members
Axis-aligned bounding box. Donor: oa::Aabb in oacpp/source/cpp/include/oa/render/fnMesh.h.
Source31 members
Semantic camera value. Composes a Transform (placement) with lens parameters (projection shape). get_view_matrix derives from the transform’s position and forward direction. get_projection_matrix uses the lens parameters with Vulkan clip-space conventions (reversed-Y, depth [0, 1]). Donor: oa::Camera / oa::FnCamera.
5 members
Solid-color material for UI elements and debug geometry. Zero texture bindings; lighting is disabled. Matches the flat_color Slang shader variant.
Source5 members
Metallic/roughness PBR material for scene geometry. OA evaluates GGX specular and Lambertian diffuse using base color, metalness, perceptual roughness, and dielectric index of refraction. Direct light, flat ambient, and emission form the current renderer subset. Base/ORM/normal descriptors are connected, but their sampling variants are not enabled by the current shader build. Texture sampling, coat, sheen, subsurface, separate emission/opacity maps, and interchange adapters remain Planned. Texture channel packing (ORM convention): orm_texture R = ambient occlusion, G = roughness, B = metalness. normal_texture stores tangent-space XY as BC5 SNORM; Z is reconstructed as sqrt(saturate(1 - dot(n.xy, n.xy))). All color values are linear at this API boundary.
5 members
Packed RGBA8 texture value reusable by Render, Presenter, Image, and UI. Two backings are currently admitted: Buffer-backed: uploaded from host bytes or a Matrix; supports read_rgba8. Render-target-backed: a non-owning alias of a Renderer slot’s color image; valid only while the originating RenderFrame is live. Readback uses RenderFrame::consume_readback, not read_rgba8.
Source5 members
Opaque index into the owning Scene’s texture registry. A handle is valid only within the Scene that issued it. Zero is reserved and will be rejected by validate_scene.
Source5 members
Textured unlit material for image and video display. One optional base-color texture; no lighting computation. Matches the unlit Slang shader variant.
SourceEnums
Semantic material value — CPU-side only, no GPU handles. Three tiers correspond to distinct shader pipelines: Material::FlatColor — flat_color shader, UI and debug. Material::Unlit — unlit shader, image/video display. Material::Surface — surface shader, metallic/roughness PBR.
FlatColor(FlatColorMaterial) · Unlit(UnlitMaterial) · Surface(SurfaceMaterial)
Functions
Deep-copy a packed Texture into independent device storage. This is the currently admitted whole-surface FnTexture::blit equivalent. Rectangle and scaled blits remain unavailable because the C++ donor also rejects them rather than silently selecting different sampling semantics. Errors Returns an error when the device copy cannot be recorded.
Return an independent packed Texture filled with one RGBA8 clear color. The result has the source extent but does not alias source storage. This is Rust’s immutable-value spelling of the C++ donor’s in-place clear. Errors Returns an error for non-finite or out-of-range color components, exhausted texture identity, or failed device allocation/upload.
Compile visible scene instances into one deterministic indexed mesh snapshot.
Compile visible scene nodes into a merged MeshData and one SceneDrawPacket per visible node that contributes geometry. The returned mesh has world-space positions and normals; each packet records the index range within the merged buffer that belongs to that node. Draw order is deterministic (depth-first scene-node order).
Recompute and store the tight axis-aligned bounding box for mesh. Clears bounds_dirty. Empty meshes produce an all-zero Aabb. Donor: oa::FnMesh::computeBounds.
Create a 3D axis-aligned cube (12 triangles, 24 vertices, size × size × size). Each face has its own four vertices with an outward normal and per-face UVs. size must be finite and positive. Donor: oa::FnMesh::createCube. Errors Returns an error for non-finite or non-positive size.
Create a fullscreen NDC quad (2 triangles, 4 vertices) in [-1, 1] XY with top-origin image UVs. Used for post-processing passes. Donor: oa::FnMesh::createFullscreenQuad.
Create a centered quad (2 triangles, 4 vertices) with top-origin image UVs. UV V=0 is the source-image top and world +Y is the quad top. For image/video viewing, pass the pixel dimensions (e.g. 1920, 1080). width and height must be finite and positive. Donor: oa::FnMesh::createQuad. Errors Returns an error for non-finite or non-positive dimensions.
Flip all vertex UVs vertically (V ← 1 − V). Used to convert explicitly bottom-origin source content to top-origin. Never fails. Donor: oa::FnMesh::flipUvsY.
Read and save one packed RGBA8 Texture using its path extension. Supported extensions are .jpg, .jpeg, .png, .webp, .bmp, and .tga. This is an explicit blocking readback and filesystem boundary. Errors Returns an error for unsupported paths, failed device observation, codec failure, or filesystem failure.
Scale all vertex positions and normals. Zero or non-finite scale components fail without modifying the mesh. Donor: oa::FnMesh::scale. Errors Returns an error when any scale component is zero or non-finite.
Decode a still-image file directly into a packed RGBA8 Texture. This host codec boundary uploads the decoded pixels once, without converting through normalized planar FP32 Image storage or reading device pixels back. Donor composition: oa/ui/viewer.cpp::openImage, FnImage::decodeFile and FnTexture::fromImage; adapted to Rust’s device-resident Image distinction. Errors Returns an error for inaccessible, unsupported or malformed media, or failed checked texture allocation/upload.
Convert one packed RGBA8 HWC image into an independent Texture value. The operation retains the texture/image semantic distinction and performs a device-side deep copy. Other image layouts, channel orders, and scalar representations require an explicit image conversion before this boundary. Errors Returns an error unless image is an unbatched U8 HWC RGBA image or its device copy cannot be recorded.
Upload one exact packed row-major RGBA8 host image as a Texture. Errors Returns an error for zero or overflowing dimensions, a mismatched byte count, exhausted semantic identity, or device allocation/upload failure.
Apply an affine matrix to all vertex positions and normals. The mesh is left unchanged when matrix is non-finite, singular, or produces non-finite vertex positions. On success, bounds_dirty is set. Donor: oa::FnMesh::transform. Errors Returns an error when matrix is non-finite, singular (no normal matrix), or produces non-finite vertex positions.
Translate all vertex positions in-place. Always succeeds; bounds are marked dirty. Donor: oa::FnMesh::translate.
Validate one scene without retaining or uploading it.
Types
8 members
Axis-aligned bounding box. Donor: oa::Aabb in oacpp/source/cpp/include/oa/render/fnMesh.h.
Source31 members
Semantic camera value. Composes a Transform (placement) with lens parameters (projection shape). get_view_matrix derives from the transform’s position and forward direction. get_projection_matrix uses the lens parameters with Vulkan clip-space conventions (reversed-Y, depth [0, 1]). Donor: oa::Camera / oa::FnCamera.
3 members
Parameters for one procedural canvas-grid frame. Fields map 1:1 onto the 100-byte fragment push block consumed by src/slang/ui/canvas_grid.frag.slang; colors are packed 0xRRGGBBAA.
Source5 members
Solid-color material for UI elements and debug geometry. Zero texture bindings; lighting is disabled. Matches the flat_color Slang shader variant.
Source4 members
Indexed triangle-list mesh snapshot. bounds and bounds_dirty mirror the OA donor fields. Constructed values from mesh::create_* have up-to-date bounds; directly assembled MeshData values start with bounds_dirty = true and bounds = Aabb::default().
Source7 members
Generation-safe lease for one submitted headless target.
Source14 members
Engine-borrowing headless render-to-texture session. Admits multiple frame sources through the same slot-ring lifecycle. submit_frame returns a RenderFrame carrying the color Texture and exact producer Event.
Source4 members
Configuration for one headless Renderer target ring.
Source4 members
Caller-owned CPU semantic scene snapshot.
Source3 members
Per-node draw range produced by compile_scene_packets. index_start and index_count are byte-aligned offsets into the merged index buffer returned alongside this packet.
Source3 members
One hierarchy node that optionally instances a mesh. local_transform is the donor oa::Transform localTransform — a TRS semantic value, not a raw matrix. material overrides the renderer’s default material for this node. None falls back to FlatColor { color: [0.8, 0.8, 0.8, 1.0] } at draw time.
Source5 members
Metallic/roughness PBR material for scene geometry. OA evaluates GGX specular and Lambertian diffuse using base color, metalness, perceptual roughness, and dielectric index of refraction. Direct light, flat ambient, and emission form the current renderer subset. Base/ORM/normal descriptors are connected, but their sampling variants are not enabled by the current shader build. Texture sampling, coat, sheen, subsurface, separate emission/opacity maps, and interchange adapters remain Planned. Texture channel packing (ORM convention): orm_texture R = ambient occlusion, G = roughness, B = metalness. normal_texture stores tangent-space XY as BC5 SNORM; Z is reconstructed as sqrt(saturate(1 - dot(n.xy, n.xy))). All color values are linear at this API boundary.
5 members
Packed RGBA8 texture value reusable by Render, Presenter, Image, and UI. Two backings are currently admitted: Buffer-backed: uploaded from host bytes or a Matrix; supports read_rgba8. Render-target-backed: a non-owning alias of a Renderer slot’s color image; valid only while the originating RenderFrame is live. Readback uses RenderFrame::consume_readback, not read_rgba8.
Source5 members
Opaque index into the owning Scene’s texture registry. A handle is valid only within the Scene that issued it. Zero is reserved and will be rejected by validate_scene.
Source5 members
Textured unlit material for image and video display. One optional base-color texture; no lighting computation. Matches the unlit Slang shader variant.
SourceEnums
Semantic material value — CPU-side only, no GPU handles. Three tiers correspond to distinct shader pipelines: Material::FlatColor — flat_color shader, UI and debug. Material::Unlit — unlit shader, image/video display. Material::Surface — surface shader, metallic/roughness PBR.
FlatColor(FlatColorMaterial) · Unlit(UnlitMaterial) · Surface(SurfaceMaterial)
oa
Types
17 members
Node-graph canvas navigation, coordinate mapping, and hit tests. Caller-owned; passed to crate::ui::Ui::node_canvas_grid to render the background grid. Pan/zoom mutations cancel any running fit animation; fit_to_view starts one that step_animation advances. Donor: oa::NodeCanvas.
3 members
Resolved grid spacing for one minor tier and its major cadences. Donor: oa::NodeCanvasGrid.
Source3 members
The winning hit-test item and the resolved world point. Donor: oa::NodeCanvasHit.
Source2 members
Borrowed hit-test geometry for one node. Donor: oa::NodeCanvasHitItem.
Source3 members
Caller-owned view state for a node-graph canvas. Donor: oa::NodeCanvasState.
Source8 members
Axis-aligned pixel rectangle in physical screen coordinates.
Source3 members
1 members
1 members
Immutable generated artifact handed from a training/evaluation producer to the viewer. The texture allocation is shared; the timeline event prevents presentation until the producing GPU batch has completed. Replacing a pending frame drops it without ever blocking the training owner. Donor: oa::TrainingPreviewFrame.
Source13 members
Non-owning TrainingSession dashboard source for Viewer live mode. Donor: oa::TrainingViewerSource.
103 members
GPU-retained UI compositor. Borrows one Engine for its lifetime; must be closed explicitly before the engine or any resource it references is released.
Initialise the UI layer. Creates pipelines and the compose image. width and height should match the presentation surface extent.
3 members
Layout descriptor passed to begin_panel.
Source5 members
Theme colors and metrics used by all widgets.
Source3 members
Caller-owned tab bar presentation state. Donor: oa::UiTabBarState.
Source4 members
A single tab entry passed to crate::ui::Ui::tab_bar. Donor: oa::UiTabItem.
Source13 members
Windowed / headless media inspection session. Donor: oa::Viewer.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
3 members
6 members
Non-owning live GPU producer attached to the Viewer lifecycle. Donor: oa::ViewerLiveSource.
Source20 members
Editor-style dock host: a serializable node tree over registered items. Implements ViewerLiveSource so a Viewer opened with ViewerMode::Workspace renders and routes through it unchanged; the dock layout round-trips through Workspace::to_json / Workspace::from_json as application-owned state.
6 members
Content provider rendered inside one workspace leaf pane. Donor scope note: items are application-owned surfaces (figure views, media views, inspectors); the workspace only routes geometry and events.
Source6 members
World-space axis-aligned bounds for canvas hit tests and fit targets. Donor: oa::WorldAabb.
SourceEnums
Sans = 0 · Mono = 1 · SansSemibold = 2
Types
44 members
3 members
Box-summary style shared by every dataset in one boxplot call.
Source16 members
Grid figure container. Created without an Engine; the Engine is supplied only at sink time.
Source22 members
Interactive Figure presentation through Viewer live mode. Attach with Viewer::set_live_source, which switches the viewer to live mode; the figure keeps its recorded theme and artists while the view owns only per-axes limit overrides.
3 members
Serializable snapshot of a FigureView’s per-axes view overrides. Limits live in display space (post-scale); restore writes them back through the axes’ scale transforms. The vector is flattened row-major over the figure grid.
Source3 members
Dense row-major heatmap style. Donor: oa::plot::HeatmapStyle.
SourceEnums
Data-to-display transform applied per axis at replay. The transform happens in display space: ticks, grid, artists, and FigureView pixel mapping all share Axes::scaled_limits.
Linear · Log10 · Symlog
Figure theme preset selector. A theme resolves to a UiStyle preset; all figure colors come from that shared token set, so plots, widgets, and viewer chrome cannot diverge. Donor: oa::plot::Theme.
Dark = 0 · Light = 1
Axis tick label presentation paired with explicit tick positions. Applies to ticks recorded through Axes::xticks/Axes::yticks; Labels pairs one string per explicit value and requires equal lengths.
Auto · Decimals(usize) · Scientific · Labels(Vec<String>)
Types
44 members
3 members
Box-summary style shared by every dataset in one boxplot call.
Source3 members
Dense row-major heatmap style. Donor: oa::plot::HeatmapStyle.
SourceEnums
Data-to-display transform applied per axis at replay. The transform happens in display space: ticks, grid, artists, and FigureView pixel mapping all share Axes::scaled_limits.
Linear · Log10 · Symlog
Axis tick label presentation paired with explicit tick positions. Applies to ticks recorded through Axes::xticks/Axes::yticks; Labels pairs one string per explicit value and requires equal lengths.
Auto · Decimals(usize) · Scientific · Labels(Vec<String>)
Constants & Variables
pub const SYMLOG_LINTHRESH: f32 = 1.0;Source Types
4 members
Pixel rect returned by Figure::cell_rect. Donor: oa::plot::Figure::Rect.
Source16 members
Grid figure container. Created without an Engine; the Engine is supplied only at sink time.
SourceEnums
Figure theme preset selector. A theme resolves to a UiStyle preset; all figure colors come from that shared token set, so plots, widgets, and viewer chrome cannot diverge. Donor: oa::plot::Theme.
Dark = 0 · Light = 1
Types
22 members
Interactive Figure presentation through Viewer live mode. Attach with Viewer::set_live_source, which switches the viewer to live mode; the figure keeps its recorded theme and artists while the view owns only per-axes limit overrides.
3 members
Serializable snapshot of a FigureView’s per-axes view overrides. Limits live in display space (post-scale); restore writes them back through the axes’ scale transforms. The vector is flattened row-major over the figure grid.
SourceTypes
3 members
One normalized-coordinate bounding box with optional label metadata. Donor: oa::CvBbox.
Source5 members
Diagnostic frame: borrowed base pixels plus ordered CPU overlays. base borrows a packed RGBA8 texture; render reads it back before compositing. A None base composites over a black canvas. Donor: oa::CvFrame.
Source2 members
One overlay batch: shared config plus its boxes. Donor: oa::CvOverlayBboxes (the only CvOverlay kind).
Source5 members
Ring-buffered detection box and label overlay. Constructed by DetectionOverlay::create; records are uploaded through the non-blocking DetectionOverlay::update, composed into a Ui frame through DetectionOverlay::draw, and released back for overwrite through DetectionOverlay::mark_consumed.
Source6 members
A fixed-capacity GPU-consumable glyph-instance buffer. Records are replaced through GlyphBuffer::upload while GlyphBuffer::mark_consumed pins the exact crate::Event a GPU consumer must complete before the next overwrite. Dropping the buffer never waits; the engine’s retirement service keeps submitted resources alive through completion.
Source4 members
One source-anchored glyph quad record, exactly 48 bytes. anchor_x/anchor_y are normalized to the source image; offset_x/offset_y and width/height are compose-target pixels. flags bit 0 rotates the source coverage counter-clockwise for bottom-to-top text; higher bits are reserved for Ui’s deterministic non-overlap batching.
Source7 members
Planar image: one retained device buffer per channel, independent dtype. Each plane is a flat row-major array of width * height elements. Missing alpha (fewer than 4 channels) defaults to 1.0 in the blit shader. The value owns its plane storage; cloning plane buffers for frame retention is internal to Ui. Donor: oa::ImagePlanes.
Source17 members
Node-graph canvas navigation, coordinate mapping, and hit tests. Caller-owned; passed to crate::ui::Ui::node_canvas_grid to render the background grid. Pan/zoom mutations cancel any running fit animation; fit_to_view starts one that step_animation advances. Donor: oa::NodeCanvas.
3 members
Resolved grid spacing for one minor tier and its major cadences. Donor: oa::NodeCanvasGrid.
Source3 members
The winning hit-test item and the resolved world point. Donor: oa::NodeCanvasHit.
Source2 members
Borrowed hit-test geometry for one node. Donor: oa::NodeCanvasHitItem.
Source3 members
Caller-owned view state for a node-graph canvas. Donor: oa::NodeCanvasState.
Source8 members
Axis-aligned pixel rectangle in physical screen coordinates.
Source8 members
Layer/filter flags for selective rendering. Donor: oa::RenderLayer.
Source6 members
Scissor rectangle for clipping. Donor: oa::ScissorDesc.
Source3 members
1 members
103 members
GPU-retained UI compositor. Borrows one Engine for its lifetime; must be closed explicitly before the engine or any resource it references is released.
Initialise the UI layer. Creates pipelines and the compose image. width and height should match the presentation surface extent.
3 members
Opaque accessibility snapshot — a flat list of node descriptors. Donor: oa::Ui::accessibilitySnapshot return.
Source3 members
3 members
Layout descriptor passed to begin_panel.
Source3 members
Return value from crate::ui::Ui::property_row. Donor: oa::UiPropertyRegion.
Source3 members
Return value from crate::ui::Ui::begin_scroll_panel. Donor: oa::UiScrollRegion.
Source3 members
Return value from crate::ui::Ui::split_pane. Donor: oa::UiSplitRegion.
Source5 members
Theme colors and metrics used by all widgets.
Source3 members
Caller-owned tab bar presentation state. Donor: oa::UiTabBarState.
Source4 members
A single tab entry passed to crate::ui::Ui::tab_bar. Donor: oa::UiTabItem.
Source4 members
Half-open row range produced by crate::ui::Ui::virtual_rows. Donor: oa::UiVirtualRange.
Source24 members
Passive view description for rendering. Declares camera, target, viewport, scissor, layer mask, and clear values. setup_image_2d/setup_image_aspect_fit manufacture and retain an orthographic camera internally; an externally borrowed camera supplied later through Self::set_camera takes precedence again. Donor: oa::Viewport.
6 members
Viewport rectangle and depth range. Donor: oa::ViewportDesc.
Source6 members
World-space axis-aligned bounds for canvas hit tests and fit targets. Donor: oa::WorldAabb.
SourceEnums
Sans = 0 · Mono = 1 · SansSemibold = 2
Per-channel storage type; selects the blit_planar normalization path. Donor: oa::ImageDtype.
U8 = 0 · U16 = 1 · F32 = 2 · Bf16 = 3
Accessibility role for a widget. Donor: oa::UiAccessibilityRole.
Button · Checkbox · Slider · TextField · ComboBox · MenuItem · Tab · TreeItem · Splitter · Timeline
Named icon for icon-button widgets. Donor: oa::UiIcon.
Previous · Next · Play · Pause · Menu · Minimize · Maximize · Restore · Close · Fullscreen · ExitFullscreen · Volume · Muted · Settings
What kind of content the viewport describes. Donor: oa::ViewportMode.
Image2D · Scene3D · Matrix · Video · CameraStream
Constants & Variables
pub const IMAGE_MAX_PLANES: usize = 4;Source Types
17 members
Node-graph canvas navigation, coordinate mapping, and hit tests. Caller-owned; passed to crate::ui::Ui::node_canvas_grid to render the background grid. Pan/zoom mutations cancel any running fit animation; fit_to_view starts one that step_animation advances. Donor: oa::NodeCanvas.
3 members
Resolved grid spacing for one minor tier and its major cadences. Donor: oa::NodeCanvasGrid.
Source3 members
The winning hit-test item and the resolved world point. Donor: oa::NodeCanvasHit.
Source2 members
Borrowed hit-test geometry for one node. Donor: oa::NodeCanvasHitItem.
Source3 members
Caller-owned view state for a node-graph canvas. Donor: oa::NodeCanvasState.
Source8 members
Axis-aligned pixel rectangle in physical screen coordinates.
Source3 members
Opaque accessibility snapshot — a flat list of node descriptors. Donor: oa::Ui::accessibilitySnapshot return.
Source3 members
3 members
Layout descriptor passed to begin_panel.
Source3 members
Return value from crate::ui::Ui::property_row. Donor: oa::UiPropertyRegion.
Source3 members
Return value from crate::ui::Ui::begin_scroll_panel. Donor: oa::UiScrollRegion.
Source3 members
Return value from crate::ui::Ui::split_pane. Donor: oa::UiSplitRegion.
Source5 members
Theme colors and metrics used by all widgets.
Source3 members
Caller-owned tab bar presentation state. Donor: oa::UiTabBarState.
Source4 members
A single tab entry passed to crate::ui::Ui::tab_bar. Donor: oa::UiTabItem.
Source4 members
Half-open row range produced by crate::ui::Ui::virtual_rows. Donor: oa::UiVirtualRange.
Source6 members
World-space axis-aligned bounds for canvas hit tests and fit targets. Donor: oa::WorldAabb.
SourceEnums
Accessibility role for a widget. Donor: oa::UiAccessibilityRole.
Button · Checkbox · Slider · TextField · ComboBox · MenuItem · Tab · TreeItem · Splitter · Timeline
Named icon for icon-button widgets. Donor: oa::UiIcon.
Previous · Next · Play · Pause · Menu · Minimize · Maximize · Restore · Close · Fullscreen · ExitFullscreen · Volume · Muted · Settings
Types
1 members
Immutable generated artifact handed from a training/evaluation producer to the viewer. The texture allocation is shared; the timeline event prevents presentation until the producing GPU batch has completed. Replacing a pending frame drops it without ever blocking the training owner. Donor: oa::TrainingPreviewFrame.
Source13 members
Non-owning TrainingSession dashboard source for Viewer live mode. Donor: oa::TrainingViewerSource.
13 members
Windowed / headless media inspection session. Donor: oa::Viewer.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
Attach a Workspace dock host; equivalent to set_live_source but selects ViewerMode::Workspace for the dock-window presentation.
3 members
6 members
Non-owning live GPU producer attached to the Viewer lifecycle. Donor: oa::ViewerLiveSource.
Source20 members
Editor-style dock host: a serializable node tree over registered items. Implements ViewerLiveSource so a Viewer opened with ViewerMode::Workspace renders and routes through it unchanged; the dock layout round-trips through Workspace::to_json / Workspace::from_json as application-owned state.
6 members
Content provider rendered inside one workspace leaf pane. Donor scope note: items are application-owned surfaces (figure views, media views, inspectors); the workspace only routes geometry and events.
Source