Skip to main content

Module qualia

Module qualia 

Source
Expand description

QualiaDB-driven scenes — the binding that makes this a semantic 3D engine.

A SemanticScene is the data-driven scene description QualiaDB produces from a graph query: SPARQL/SPARQL-star results, or N3/modalities inference output (e.g. the anatomy use-case — health observations → organ highlights with an intensity score). Each SceneItem carries its provenance so geometry is traceable back to the NQuin that justified it.

The split is deliberate:

  • Semantics (what to show, how hot, why) come from QualiaDB.
  • Geometry (where each item sits, what mesh) comes from a layout the consumer supplies (e.g. an anatomical atlas), so the same semantic scene can drive a body map, a knowledge graph, or a physics field.

On native, the heavy math/physics behind a scene belongs to QualiaDB (geometric_algebra SIMD, domains::physical, quantum_dft, ode_solver, diffusion shaders/); this module is the UI-side binding, not a math engine.

Structs§

SceneItem
One element of a semantic scene, produced by a QualiaDB query/inference.
SemanticScene
A semantic, backend-neutral scene description from QualiaDB. Deserializes from the representation-contract payload returned by a Tauri command / SPARQL query.

Enums§

ItemState
Visual state of a semantic item. Matches the anatomy representation contract ("highlighted", "active", …) so a QualiaDB payload deserializes directly.

Traits§

SceneSource
Anything that yields a SemanticScene from the graph — a Tauri command result wrapper, a SPARQL binding, or the offline stub. Lets UI code stay agnostic about whether the engine answered or a preview did.

Functions§

build_scene
Build a renderable Scene from a SemanticScene plus a layout that maps each item id to its world position and mesh. Items the layout doesn’t recognise are skipped. Each item becomes a Node colored by item_color; its provenance and reasons ride along on the node label for inspection/tooltips.
item_color
Map a semantic state + intensity to a themeable CSS color. Higher intensity pushes toward the warm accent; lower stays cool/muted. Deterministic.