• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • SDFPreviewWidget
  • SDFPreviewWidget Class

    The definition editor's preview of the definition it edits. More...

    Header: #include <SDFPreviewWidget>
    Inherits: QWidget

    Detailed Description

    The 3D view is live (construct-multi-document MD-38). It is a SceneWorkerWidget, the viewport that the scene uses, and it draws a small document that holds the edited definition (stageDefinitionPreview()). A ViewportFeed hands the document over, with the rules that the scene viewport uses.

    A parameter drag changes the one subject instance, and the worker takes a delta. It renders at the rate of the scene viewport and nothing compiles. An edit to the shader restages the document when the text validates. The worker then rebuilds off the GUI thread, and the last frame stays up. A new definition is framed once, and an edit keeps the camera of the user. A double click frames again. The camera gestures are those of the scene viewport. The hover highlight and the pick are off, because they only cover the one item.

    Before MD-38, the preview asked SDFThumbnailGenerator for a new picture for each change. Each request was a queued render with its own framing passes, so a drag queued many of them. The picture came 5 to 30 seconds after the slider (owner, 2026-10-04).

    The 2D cross-section still renders through SDFThumbnailGenerator.

    See also SDFPrimitiveEditorWidget and construct::rendering::ViewportFeed.