Skip to content

KuesaUtils::ViewConfiguration

ViewConfiguration provides a way of conveniently specifying different views of the same scene. More...

#include <viewconfiguration.h>

Inherits from Kuesa::Qt3D::KuesaNode, Qt3DCore::QNode

Public Slots

Name
void setCameraName(const QString & cameraName)
void setLayerNames(const QStringList & layerNames)
void setViewportRect(const QRectF & viewportRect)
void setFrustumCulling(bool frustumCulling)
void setSkinning(bool skinning)
void setBackToFrontSorting(bool backToFrontSorting)
void setZFilling(bool zFilling)
void setParticlesEnabled(bool particlesEnabled)
void setToneMappingAlgorithm(Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)
void setUsesStencilMask(bool usesStencilMask)
void setExposure(float exposure)
void setGamma(float gamma)
void setClearColor(QColor clearColor)

Public Signals

Name
void cameraNameChanged(const QString & cameraName)
void layerNamesChanged(const QStringList & layerNames)
void viewportRectChanged(QRectF viewportRect)
void frustumCullingChanged(bool frustumCulling)
void skinningChanged(bool skinning)
void backToFrontSortingChanged(bool backToFrontSorting)
void zFillingChanged(bool zFillingChanged)
void particlesEnabledChanged(bool particlesEnabled)
void toneMappingAlgorithmChanged(Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)
void usesStencilMaskChanged(bool usesStencilMask)
void exposureChanged(float exposure)
void gammaChanged(float gamma)
void clearColorChanged(QColor clearColor)
void transformTrackerAdded(Kuesa::Qt3D::TransformTracker * tracker)
void transformTrackerRemoved(Kuesa::Qt3D::TransformTracker * tracker)
void placeholderTrackerAdded(Kuesa::Qt3D::PlaceholderTracker * tracker)
void placeholderTrackerRemoved(Kuesa::Qt3D::PlaceholderTracker * tracker)
void postProcessingEffectAdded(Kuesa::Qt3D::AbstractPostProcessingEffect * fx)
void postProcessingEffectRemoved(Kuesa::Qt3D::AbstractPostProcessingEffect * fx)
void loadingDone()
void unloadingDone()

Public Functions

Name
ViewConfiguration(Qt3DCore::QNode * parent =nullptr)
QString cameraName() const
QStringList layerNames() const
QRectF viewportRect() const
bool frustumCulling() const
bool skinning() const
bool backToFrontSorting() const
bool zFilling() const
bool particlesEnabled() const
Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm() const
bool usesStencilMask() const
float exposure() const
float gamma() const
QColor clearColor() const
const std::vector< Kuesa::Qt3D::TransformTracker * > & transformTrackers() const
void addTransformTracker(Kuesa::Qt3D::TransformTracker * tracker)
void removeTransformTracker(Kuesa::Qt3D::TransformTracker * tracker)
void clearTransformTrackers()
const std::vector< Kuesa::Qt3D::PlaceholderTracker * > & placeholderTrackers() const
void addPlaceholderTracker(Kuesa::Qt3D::PlaceholderTracker * tracker)
void removePlaceholderTracker(Kuesa::Qt3D::PlaceholderTracker * tracker)
void clearPlaceholderTrackers()
const std::vector< Kuesa::Qt3D::AbstractPostProcessingEffect * > & postProcessingEffects() const
void addPostProcessingEffect(Kuesa::Qt3D::AbstractPostProcessingEffect * effect)
void removePostProcessingEffect(Kuesa::Qt3D::AbstractPostProcessingEffect * effect)
void clearPostProcessingEffects()

Public Properties

Name
QString cameraName
The name of the camera asset that should be used to view the scene. If the name references a valid camera, the camera will automatically be set on the ForwardRenderer frameGraph and other internal assets such as TransformTracker .
QStringList layerNames
The list of KDAB_layers layer names to be selected for rendering. This allows selecting only a sub part of a glTF 2 model to only render parts that are linked to a specific layer.
QRectF viewportRect
bool frustumCulling
bool skinning
bool backToFrontSorting
bool zFilling
bool particlesEnabled
Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm
bool usesStencilMask
float exposure
float gamma
QColor clearColor

Additional inherited members

Public Slots inherited from Kuesa::Qt3D::KuesaNode

Name
void setSceneEntity(Kuesa::Qt3D::SceneEntity * sceneEntity)

Public Signals inherited from Kuesa::Qt3D::KuesaNode

Name
void sceneEntityChanged(Kuesa::Qt3D::SceneEntity * sceneEntity)

Public Functions inherited from Kuesa::Qt3D::KuesaNode

Name
KuesaNode(Qt3DCore::QNode * parent =nullptr)
SceneEntity * sceneEntity() const

Public Properties inherited from Kuesa::Qt3D::KuesaNode

Name
Kuesa::Qt3D::SceneEntity * sceneEntity

Protected Attributes inherited from Kuesa::Qt3D::KuesaNode

Name
SceneEntity * m_sceneEntity

Detailed Description

1
class KuesaUtils::ViewConfiguration;

ViewConfiguration provides a way of conveniently specifying different views of the same scene.

Since: Kuesa 2.0

Public Slots Documentation

slot setCameraName

1
2
3
void setCameraName(
    const QString & cameraName
)

slot setLayerNames

1
2
3
void setLayerNames(
    const QStringList & layerNames
)

slot setViewportRect

1
2
3
void setViewportRect(
    const QRectF & viewportRect
)

slot setFrustumCulling

1
2
3
void setFrustumCulling(
    bool frustumCulling
)

slot setSkinning

1
2
3
void setSkinning(
    bool skinning
)

slot setBackToFrontSorting

1
2
3
void setBackToFrontSorting(
    bool backToFrontSorting
)

slot setZFilling

1
2
3
void setZFilling(
    bool zFilling
)

slot setParticlesEnabled

1
2
3
void setParticlesEnabled(
    bool particlesEnabled
)

slot setToneMappingAlgorithm

1
2
3
void setToneMappingAlgorithm(
    Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm
)

slot setUsesStencilMask

1
2
3
void setUsesStencilMask(
    bool usesStencilMask
)

slot setExposure

1
2
3
void setExposure(
    float exposure
)

slot setGamma

1
2
3
void setGamma(
    float gamma
)

slot setClearColor

1
2
3
void setClearColor(
    QColor clearColor
)

Public Signals Documentation

signal cameraNameChanged

1
2
3
void cameraNameChanged(
    const QString & cameraName
)

signal layerNamesChanged

1
2
3
void layerNamesChanged(
    const QStringList & layerNames
)

signal viewportRectChanged

1
2
3
void viewportRectChanged(
    QRectF viewportRect
)

signal frustumCullingChanged

1
2
3
void frustumCullingChanged(
    bool frustumCulling
)

signal skinningChanged

1
2
3
void skinningChanged(
    bool skinning
)

signal backToFrontSortingChanged

1
2
3
void backToFrontSortingChanged(
    bool backToFrontSorting
)

signal zFillingChanged

1
2
3
void zFillingChanged(
    bool zFillingChanged
)

signal particlesEnabledChanged

1
2
3
void particlesEnabledChanged(
    bool particlesEnabled
)

signal toneMappingAlgorithmChanged

1
2
3
void toneMappingAlgorithmChanged(
    Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm
)

signal usesStencilMaskChanged

1
2
3
void usesStencilMaskChanged(
    bool usesStencilMask
)

signal exposureChanged

1
2
3
void exposureChanged(
    float exposure
)

signal gammaChanged

1
2
3
void gammaChanged(
    float gamma
)

signal clearColorChanged

1
2
3
void clearColorChanged(
    QColor clearColor
)

signal transformTrackerAdded

1
2
3
void transformTrackerAdded(
    Kuesa::Qt3D::TransformTracker * tracker
)

signal transformTrackerRemoved

1
2
3
void transformTrackerRemoved(
    Kuesa::Qt3D::TransformTracker * tracker
)

signal placeholderTrackerAdded

1
2
3
void placeholderTrackerAdded(
    Kuesa::Qt3D::PlaceholderTracker * tracker
)

signal placeholderTrackerRemoved

1
2
3
void placeholderTrackerRemoved(
    Kuesa::Qt3D::PlaceholderTracker * tracker
)

signal postProcessingEffectAdded

1
2
3
void postProcessingEffectAdded(
    Kuesa::Qt3D::AbstractPostProcessingEffect * fx
)

signal postProcessingEffectRemoved

1
2
3
void postProcessingEffectRemoved(
    Kuesa::Qt3D::AbstractPostProcessingEffect * fx
)

signal loadingDone

1
void loadingDone()

signal unloadingDone

1
void unloadingDone()

Public Functions Documentation

function ViewConfiguration

1
2
3
explicit ViewConfiguration(
    Qt3DCore::QNode * parent =nullptr
)

function cameraName

1
QString cameraName() const

function layerNames

1
QStringList layerNames() const

function viewportRect

1
QRectF viewportRect() const

function frustumCulling

1
bool frustumCulling() const

function skinning

1
bool skinning() const

function backToFrontSorting

1
bool backToFrontSorting() const

function zFilling

1
bool zFilling() const

function particlesEnabled

1
bool particlesEnabled() const

function toneMappingAlgorithm

1
Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm() const

function usesStencilMask

1
bool usesStencilMask() const

function exposure

1
float exposure() const

function gamma

1
float gamma() const

function clearColor

1
QColor clearColor() const

function transformTrackers

1
const std::vector< Kuesa::Qt3D::TransformTracker * > & transformTrackers() const

function addTransformTracker

1
2
3
void addTransformTracker(
    Kuesa::Qt3D::TransformTracker * tracker
)

function removeTransformTracker

1
2
3
void removeTransformTracker(
    Kuesa::Qt3D::TransformTracker * tracker
)

function clearTransformTrackers

1
void clearTransformTrackers()

function placeholderTrackers

1
const std::vector< Kuesa::Qt3D::PlaceholderTracker * > & placeholderTrackers() const

function addPlaceholderTracker

1
2
3
void addPlaceholderTracker(
    Kuesa::Qt3D::PlaceholderTracker * tracker
)

function removePlaceholderTracker

1
2
3
void removePlaceholderTracker(
    Kuesa::Qt3D::PlaceholderTracker * tracker
)

function clearPlaceholderTrackers

1
void clearPlaceholderTrackers()

function postProcessingEffects

1
const std::vector< Kuesa::Qt3D::AbstractPostProcessingEffect * > & postProcessingEffects() const

function addPostProcessingEffect

1
2
3
void addPostProcessingEffect(
    Kuesa::Qt3D::AbstractPostProcessingEffect * effect
)

function removePostProcessingEffect

1
2
3
void removePostProcessingEffect(
    Kuesa::Qt3D::AbstractPostProcessingEffect * effect
)

function clearPostProcessingEffects

1
void clearPostProcessingEffects()

Public Property Documentation

property cameraName

1
QString cameraName;

The name of the camera asset that should be used to view the scene. If the name references a valid camera, the camera will automatically be set on the ForwardRenderer frameGraph and other internal assets such as TransformTracker .

property layerNames

1
QStringList layerNames;

The list of KDAB_layers layer names to be selected for rendering. This allows selecting only a sub part of a glTF 2 model to only render parts that are linked to a specific layer.

property viewportRect

1
QRectF viewportRect;

Holds the viewport rectangle from within which the rendering will occur. Rectangle is in normalized coordinates.

property frustumCulling

1
bool frustumCulling;

Holds whether frustum culling is enabled or not. Enabled by default.

property skinning

1
bool skinning;

property backToFrontSorting

1
bool backToFrontSorting;

Holds whether back to front sorting to render objects in back-to-front order is enabled. This is required for proper alpha blending rendering. Enabled by default.

property zFilling

1
bool zFilling;

Holds whether multi-pass zFilling support is enabled. Disabled by default.

property particlesEnabled

1
bool particlesEnabled;

Holds whether particles support is enabled. Disabled by default.

property toneMappingAlgorithm

1
Kuesa::Qt3D::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm;

Tone mapping specifies how we perform color conversion from HDR (high dynamic range) content to LDR (low dynamic range) content which our monitor displays.

\default ToneMappingAndGammaCorrectionEffect::None

property usesStencilMask

1
bool usesStencilMask;

Enables/disables stencil buffers. If true, stencil operations be used during the render phase to modify the stencil buffer. The resulting stencil buffer can later be used to apply post process effect to only part of the scene

\default False

property exposure

1
float exposure;

Exposure correction factor used before the linear to sRGB conversion. \default 0

property gamma

1
float gamma;

Holds the gamma value to use for gamma correction that brings linear colors to sRGB colors. \default 2.2

property clearColor

1
QColor clearColor;

Holds the color used to clear the screen at the start of each frame.


Updated on 2023-07-03 at 11:02:02 +0000