Qt 3D Studio Runtime C++ Classes | Runtime 2.1

Qt 3D Studio | Runtime | Qt 3D Studio Runtime C++ Classes

Qt 3D Studio Runtime 2.1 Manual

# Qt 3D Studio Runtime C++ Classes

To include the definitions of the module's classes, use the following directive:

      #include <Qt3DStudioRuntime2>

To link against the module, add this line to your qmake `.pro` file:

      QT += 3dstudioruntime2

## Integrating

The two main classes are Q3DSWidget and Q3DSSurfaceViewer. Q3DSWidget is a QWidget that can be used to show presentations inside a widget-based user interface. Q3DSSurfaceViewer allows targeting a QWindow or an offscreen render target (an OpenGL texture).

Note: Qt applications based on QML and Qt Quick will rather want to use the Studio3D type from Qt 3D Studio Runtime QML Types.

## Controlling

Each Q3DSWidget and Q3DSSurfaceViewer instance exposes a Q3DSPresentation. This, possibly in combination with Q3DSDataInput or Q3DSElement objects, allows

- changing scene object properties (for example, the transform of a model, colors and other settings of a material, etc.),
- changing slides (thus starting the relevant animations and applying the scene object property changes associated with the new slide),
- and controlling the timeline (the current playback position for the key-frame based animations) both on the main scene and on individual Component nodes.

## Classes

Q3DSDataInput | Controls a data input entry in a Qt 3D Studio presentation
Q3DSElement | Controls a scene object (node) in a Qt 3D Studio presentation
Q3DSPresentation | Represents a Qt 3D Studio presentation
Q3DSSceneElement | Controls the special Scene or Component scene objects in a Qt 3D Studio presentation
Q3DSSurfaceViewer | Renders a Qt 3D Studio presentation on a QWindow or an offscreen render target using OpenGL
Q3DSViewerSettings | Qt 3D Studio presentation viewer settings
Q3DSWidget | A widget that renders Qt 3D Studio presentations using OpenGL