SceneConfiguration provides a way of conveniently specifying information about a glTF2 file and accompanying helpers to be loaded. More...
Since: | Kuesa 1.3 |
Instantiates: | SceneConfiguration |
SceneConfiguration provides a way of conveniently specifying information about a glTF2 file and accompanying helpers to be loaded.
When building an application that should display different scenes at different moments in time, recreating a new Qt 3D view with its FrameGraph, Kuesa::GLTF2Importer and other assets can be costly and unnecessary. Yet, that approach is still often favored as it can be seen as more convenient for the developer from an architecture point of view.
The KuesaUtils::SceneConfiguration used in conjunction with KuesaUtils::View3DScene provides a new way to architecture such type of applications. The idea is to instantiate the View3D once and use its KuesaUtils::View3DScene::activeScene property to point to different KuesaUtils::SceneConfiguration instances. Internally, when the active scene is changed, the new glTF2 file will be loaded and assets needed created while previous glTF2 file and assets unloaded.
The signals KuesaUtils::SceneConfiguration::loadingDone and KuesaUtils::SceneConfiguration::unloadingDone can be used to watch which state the SceneConfiguration is in and react accordingly.
KuesaUtils::SceneConfiguration can also specify different viewports for showing different parts of a glTF2 scene at the same moment in time. This is done by adding or removing KuesaUtils::ViewConfiguration.