Skip to main content

Module model_viewer

Module model_viewer 

Source
Expand description

A bounded viewer for a 3D model: orbit, flat shading, and a refusal.

§What this component will not do

It does not load anything. The bytes are read by ModelScene::parse, which the host calls, and the outcome — a scene or a refusal — is what this component is handed. There is no file, no network, and no asset resolution here.

It does not draw what it did not read. The reader takes positions and triangles; it does not take materials, textures, or normals. So the model is drawn flat-shaded from face normals it computed, or as a wireframe, and neither is presented as the material the document described.

It does not scale a refusal down into an empty frame. A document past a bound and a document outside the subset are two different sentences, and each names what it asked for and what was allowed. A viewer with no model at all is a third.

It does not turn the model by itself. Orbit is caller-owned, exactly as an image viewer’s fit is: a drag reports the angles it asks for, and the model turns when the caller says it did.

Structs§

ModelViewer
A bounded viewer for one 3D model.

Enums§

ModelShading
How the model is drawn.
ModelState
What the viewer has, as the host reports it.
ModelViewerEvent
What a model viewer reports. It applies none of it.