Kuesa Runtime

SceneConfiguration Class

class KuesaUtils::SceneConfiguration

SceneConfiguration provides a way of conveniently specifying information about a glTF2 file and accompanying helpers to be loaded. More...

Header: #include <SceneConfiguration>
Since: Kuesa 1.3
Instantiated By: SceneConfiguration
Inherits: Kuesa::KuesaNode

This class was introduced in Kuesa 1.3.

Properties

Public Functions

QUrl source() const

Public Slots

void setSource(const QUrl &source)

Signals

void sourceChanged(const QUrl &source)

Detailed Description

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 View3DScene 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.

Property Documentation

source : QUrl

This property holds the source of the glTF file to be loaded.

Access functions:

QUrl source() const
void setSource(const QUrl &source)

Notifier signal:

void sourceChanged(const QUrl &source)