lib-viewport · crate

kinogaki-viewport-core

Libraryenvironment

Kinogaki viewport core: what a 3D viewport shows, independent of any GPU API or UI toolkit.

Repository
lib-viewport (kinogaki/lib-viewport)
Folder
libs/lib-viewport/crates/core
Source
16 files, 4,768 lines
Tests
2 files, 391 lines
Depends on This crate Used by Kinogaki Studio's edit contracts: what core and the kernels agree on when a value is selected and changed.kinogaki-edit Kinogaki Studio's standard geometry values.kinogaki-geometry Kinogaki's vectors, points, matrices, quaternions and deterministic elementary functions.kinogaki-math Kinogaki's viewport packet contract: what a data type hands Studio's viewport to draw, with no GPU or UI API.kinogaki-viewport-api kinogaki-viewport-core Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one.kinogaki-editor Geometry, curves and B-reps in the viewport, independent of any GPU API: the SDK's standard values as surface packets (over the SDK's display triangulation and shading normals, so Solid draws what Render renders), the one picker that answers rays and boxes ...kinogaki-geometry-view `ImagePipeline`: what renders become on screen and in files.kinogaki-image-pipeline Studio's scene: the document cooked object by object.kinogaki-scene The plugin SDK's UI layer over lib-ui: the SDK's [`Ui`](studio_ui_api::Ui) and [`Painter`](studio_ui_api::Painter), its sheets and the host's services, implemented over lib-ui.kinogaki-sdk-ui Kinogaki's wgpu viewport renderer: pipelines, retained GPU buffers, offscreen multisampled targets and owned WGSL shaders.kinogaki-viewport-gpu Kinogaki viewport widgets for Kinogaki UI (lib-ui): one/four-view layout, camera navigation, the six-axis view cube, transform gizmo handles and point number labels.kinogaki-viewport-ui
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

Kinogaki viewport core: what a 3D viewport shows, independent of any GPU API or UI toolkit.

The packet contract (surface packets, line classes, point markers, element selections, overlay layers, draw updates and shading plans) is the SDK's kinogaki-viewport-api, re-exported here whole so kernels and renderers name one crate. On top of it:

  • PreviewUpdate: a live transform drag's patches and GPU motions over an uploaded packet (MotionMask, PartMotion, WeightedMotion with its PointWeights).
  • Camera orbit camera with perspective/orthographic projections, view rays, and the world's up axis and ground grid (Ground).
  • pick: picking a packet's triangles (with barycentric coordinates), lines (by class and id) and points (by id).
  • MergedSurface (several packets drawn as one) and PlainSurface.
  • DisplayRanges: the curvature analysis display ranges.
  • columns: a packet's columns read back as records, and an element's center from them.

kinogaki-viewport-gpu renders these with wgpu; kinogaki-viewport-ui provides the egui viewport widgets.

Depends on

CrateRepositoryAsWhat it is
kinogaki-editSDKnormalKinogaki Studio's edit contracts: what core and the kernels agree on when a value is selected and changed.
kinogaki-geometrySDKnormalKinogaki Studio's standard geometry values.
kinogaki-mathlib-mathnormalKinogaki's vectors, points, matrices, quaternions and deterministic elementary functions.
kinogaki-viewport-apiSDKnormalKinogaki's viewport packet contract: what a data type hands Studio's viewport to draw, with no GPU or UI API.

Third-party

CrateVersionLicenceFrozen inAsAlso used by
bytemuck1.25.2Zlib OR Apache-2.0 OR MITlib-ui/vendornormalkinogaki-composit-wgpu, kinogaki-geometry, kinogaki-geometry-view, kinogaki-image-pipeline, kinogaki-math, kinogaki-pixel, kinogaki-ui, kinogaki-ui-wgpu and 2 more

Used by

CrateRepositoryAsWhat it is
kinogaki-editorCore and the appnormalKinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one.
kinogaki-geometry-viewCore and the appnormalGeometry, curves and B-reps in the viewport, independent of any GPU API: the SDK's standard values as surface packets (over the SDK's display triangulation and shading normals, so Solid draws what Render renders), the one picker that answers rays and boxes ...
kinogaki-image-pipelineCore and the appnormalImagePipeline: what renders become on screen and in files.
kinogaki-sceneCore and the appnormalStudio's scene: the document cooked object by object.
kinogaki-sdk-uiCore and the appnormalThe plugin SDK's UI layer over lib-ui: the SDK's Ui and Painter, its sheets and the host's services, implemented over lib-ui.
kinogaki-viewport-gpulib-viewportnormalKinogaki's wgpu viewport renderer: pipelines, retained GPU buffers, offscreen multisampled targets and owned WGSL shaders.
kinogaki-viewport-uilib-viewportnormalKinogaki viewport widgets for Kinogaki UI (lib-ui): one/four-view layout, camera navigation, the six-axis view cube, transform gizmo handles and point number labels.

Modules

Public types and traits

At the crate root

Structs CameraDisplayRangesGroundLensMergedSurfaceMotionMaskPartPartMotionPatchPlainSurfacePointWeightsPreviewUpdateRayWeightedMotion

Enums Up

Re-exported from other crates

From kinogaki_viewport_api *

By module: 21 public types and traits in 8 modules

analysis DisplayRanges

camera CameraGroundLensUp

merged MergedSurfacePart

pick PickerPickHitPickQueryPickTargetPickView

pick::seen Seen

plain PlainSurface

preview MotionMaskPartMotionPatchPointWeightsPreviewUpdateWeightedMotion

ray Ray

Besides these, 3 public functions at module level.