Core and the app · crate
kinogaki-geometry-view
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 ...
- Repository
- Core and the app (kinogaki/studio-core)
- Folder
studio/core/geometry-view- Source
- 35 files, 9,933 lines
- Tests
- 12 files, 3,580 lines
What it is
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 (lib-viewport's, kept with each packet), snapping, and transform drag previews, and how they look in Shaded mode (material tints, Cd). Point, vertex and triangle numbering is a pure function of the value, so plugins build overlays naming them from the value alone.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-brep-mesh | Core and the app | normal | B-reps as polygons, below the viewport, renders and file exchange alike: each body's mesh by the installed mesher, cached on its geometry (meshed), and a value's bodies joined into one polygons value (joined): each body's mesh, the faces' polygons ... |
kinogaki-math | lib-math | normal | Kinogaki's vectors, points, matrices, quaternions and deterministic elementary functions. |
kinogaki-parallel | lib-parallel | normal | Scoped parallel work over disjoint output slices, sized by cost. |
kinogaki-render-api | SDK | normal | Kinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API. |
kinogaki-spans | Core and the app | normal | Timed spans of Studio's own work: where a frame, a cook or a render sync spends its time, without an instrumented build. |
kinogaki-studio-api | SDK | normal | Kinogaki Studio's headless plugin API. |
kinogaki-viewport-core | lib-viewport | normal | Kinogaki viewport core: what a 3D viewport shows, independent of any GPU API or UI toolkit. |
For its tests alone
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-studio-api-testing | SDK | tests | The SDK's test support (a dev-dependency only): assert_refused for admission tests, read_hostile for a format's tests of hostile files, format for its scratch folders and round trips, workers as a host installs them, with wgpu an ... |
kinogaki-viewport-gpu | lib-viewport | tests | Kinogaki's wgpu viewport renderer: pipelines, retained GPU buffers, offscreen multisampled targets and owned WGSL shaders. |
Third-party
| Crate | Version | Licence | Frozen in | As | Also used by |
|---|---|---|---|---|---|
blake3 | 1.8.7 | CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception | lib-ui/vendor | normal | kinogaki-core-package, kinogaki-geometry, kinogaki-network, kinogaki-scene |
bytemuck | 1.25.2 | Zlib OR Apache-2.0 OR MIT | lib-ui/vendor | normal | kinogaki-composit-wgpu, kinogaki-geometry, kinogaki-image-pipeline, kinogaki-math, kinogaki-pixel, kinogaki-ui, kinogaki-ui-wgpu, kinogaki-viewport-api and 2 more |
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-core-package | Core and the app | normal | Core's own SDK package (kinogaki.core): what Studio holds whatever plugins are installed. |
kinogaki-editor | Core and the app | normal | Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one. |
kinogaki-network | Core and the app | tests | Studio's core networks (design: core-owned networks; "Cooking DAG for nodes is studio core"). |
Modules
brepB-rep values in the viewport.39 linesbrep::construction(private)What a B-rep value shows beside its bodies: its datums and free curves (Construction), as one polygons value drawn through the polygons path.188 linesbrep::facets(private)How B-rep values show, are picked and are snapped to: through the polygons path over aBrepSurface, with its elements mapped back to the value's faces, edges and vertices.364 linesbrep::mesh(private)The value as the viewport draws it: its bodies' joined polygons value (joined) with the maps back to the value's faces, edges and vertices, and beside them its datums and free curves (Construction), the two drawn as one ...518 linesbrep::tables(private)What the spreadsheet shows of B-rep values: the bodies (name, kind and their face, edge and vertex counts), then the faces, edges and vertices as the value numbers them (Brep::count: the bodies' in body order, then the free curves and datums), each with ...181 linescurvaturePrincipal curvatures at a polygons value's points, for the viewport's curvature shading: mixed Voronoi area and cotangent estimates over the display triangulation, as the reference application estimates them.114 linescurvesCurve primitives in the viewport:CurveSamples, every curve primitive of aGeometrysampled as the polyline the viewport draws.162 linesfacetsHow geometry values show and are picked:GeometryDisplayprepares a value'sGeometrySurface(kept as itsDrawn's detail) and shows a selection on it;GeometryPickingpicks, boxes and frames an object on it;GeometrySnappingfinds what a ...374 linesimageImages on core's surfaces: the spreadsheet's Layers and Detail tables, and the 2D canvas's picture and probe.166 lineslinesHow edges and curves draw: the edge class of a surface's polygon edges, the polyline class of the edges polylines use, and the curve class of curve primitives drawn as their samples, which selects at the face level (each line is its primitive).80 lineslookShaded mode's surface colors for polygons values (GeometryLook, theirLook): each polygon's material as its engine approximates it (a color times a primvar, as the host'sMaterialDisplayssays), or itsCd, all linear in the working space.454 linespickGeometryPicks: the viewport's picks on a geometry value's surface as its component selections.172 linespickingWhat a ray meets on a geometry value, exactly: the hitGeometrySurfacepicks report, worked out on the value's ownf64positions for the triangles its picker finds along the ray.48 linespreviewDragPreview: a component transform drag shown over the displayedGeometrySurfaceas sparse, reversible patches (PreviewUpdate).367 linespreview::curves(private)Curves: the curve primitives a drag moves.85 linespreview::region(private)Region: the polygons a move changes, as a value of their own, so a move recomputes them by the SDK's own rules (Geometry::triangulation,Geometry::shading_normals) at the cost of the region, not of the whole value.315 linespreview::weighted(private)Weighted previews: soft and symmetric moves.286 linessnap(private)Snapping a dragged position to a geometry value under the pointer: points, edges' middles, polygons' centers, edges and curves crossing on screen, the nearest place on an edge or a curve, and the surface.542 linessurfaceGeometrySurface: a geometry value as the viewport draws and picks it.348 linessurface::derived(private)Packets whose shading the renderer derives: a gesture's steps that move most points (a deformer's row dragged over every point).375 linessurface::edited(private)A packet made from the previous one when the value's table changed in a few rows (an extrude, a removed face, the undo of either): only what those rows reach is made again and written, the changed ranges recorded so the renderer patches its buffers (a picker ...235 linessurface::lines(private)The packet's lines and their ids.269 linessurface::picks(private)Picks and snapping candidates on a surface, through its one picker (lib-viewport'sPicker, kept with the packet): the picker lists what lies along a ray or in a screen square, its boxes reaching past theirf32copies, and the hits are worked out on the ...161 linessurface::segments(private)What the viewport outlines: a selection's edges and polygon sides, and the polygons of the object under the pointer.135 linessurface::source(private)The packet as a viewport surface: its paged columns, element counts and face ranges.118 linessurface::update(private)A packet made from the previous one when points moved (a drag's next state, a drag let go): only what the moved points reach is recomputed, on the workers, and only what differs rewritten, the changed byte ranges recorded so the renderer patches its buffers ...368 linestablesWhat the spreadsheet shows of geometry values: a table a domain the value has (points, vertices, primitives, edges, detail), each with its built-in columns (a point's position, a vertex's point, a primitive's kind and vertex count, an edge's two points) and ...220 lines
Public types and traits
At the crate root
Structs BrepDisplayBrepPickingBrepPicksBrepSnappingBrepSurfaceBrepTablesCurveSamplesGeometryDisplayGeometryLookGeometryPickingGeometryPicksGeometrySnappingGeometrySurfaceGeometryTablesImageCanvasImageTables
Enums Line
By module: 19 public types and traits in 13 modules
brep::facets BrepDisplayBrepPickingBrepPicksBrepSnapping
brep::mesh BrepSurface
brep::tables BrepTables
curves CurveSamples
facets GeometryDisplayGeometryPickingGeometrySnapping
image ImageCanvasImageTables
look GeometryLook
pick GeometryPicks
picking Hit
preview DragPreview
surface GeometrySurface
surface::lines Line
tables GeometryTables
Besides these, 14 public functions at module level.
