Kuesa Runtime

ViewConfiguration Class

class KuesaUtils::ViewConfiguration

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

Header: #include <ViewConfiguration>
Since: Kuesa 1.4
Instantiated By: ViewConfiguration
Inherits: Kuesa::KuesaNode

This class was introduced in Kuesa 1.4.

Properties

Public Functions

bool backToFrontSorting() const
QString cameraName() const
QColor clearColor() const
float exposure() const
bool frustumCulling() const
float gamma() const
QStringList layerNames() const
bool particlesEnabled() const
bool skinning() const
Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm() const
bool usesStencilMask() const
QRectF viewportRect() const
bool zFilling() const

Public Slots

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

Signals

void backToFrontSortingChanged(bool backToFrontSorting)
void cameraNameChanged(const QString &cameraName)
void clearColorChanged(QColor clearColor)
void exposureChanged(float exposure)
void frustumCullingChanged(bool frustumCulling)
void gammaChanged(float gamma)
void layerNamesChanged(const QStringList &layerNames)
void particlesEnabledChanged(bool particlesEnabled)
void skinningChanged(bool skinning)
void toneMappingAlgorithmChanged(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)
void usesStencilMaskChanged(bool usesStencilMask)
void viewportRectChanged(QRectF viewportRect)
void zFillingChanged(bool zFillingChanged)

Detailed Description

Property Documentation

backToFrontSorting : bool

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.

Access functions:

bool backToFrontSorting() const
void setBackToFrontSorting(bool backToFrontSorting)

Notifier signal:

void backToFrontSortingChanged(bool backToFrontSorting)

cameraName : QString

This property holds 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 Kuesa::TransformTracker.

Access functions:

QString cameraName() const
void setCameraName(const QString &cameraName)

Notifier signal:

void cameraNameChanged(const QString &cameraName)

clearColor : QColor

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

Access functions:

QColor clearColor() const
void setClearColor(QColor clearColor)

Notifier signal:

void clearColorChanged(QColor clearColor)

exposure : float

Exposure correction factor used before the linear to sRGB conversion.

Access functions:

float exposure() const
void setExposure(float exposure)

Notifier signal:

void exposureChanged(float exposure)

frustumCulling : bool

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

Access functions:

bool frustumCulling() const
void setFrustumCulling(bool frustumCulling)

Notifier signal:

void frustumCullingChanged(bool frustumCulling)

gamma : float

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

Access functions:

float gamma() const
void setGamma(float gamma)

Notifier signal:

void gammaChanged(float gamma)

layerNames : QStringList

This property holds 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.

Access functions:

QStringList layerNames() const
void setLayerNames(const QStringList &layerNames)

Notifier signal:

void layerNamesChanged(const QStringList &layerNames)

particlesEnabled : bool

Holds whether particles support is enabled. Disabled by default.

Access functions:

bool particlesEnabled() const
void setParticlesEnabled(bool particlesEnabled)

Notifier signal:

void particlesEnabledChanged(bool particlesEnabled)

toneMappingAlgorithm : Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping

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

Access functions:

Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping toneMappingAlgorithm() const
void setToneMappingAlgorithm(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)

Notifier signal:

void toneMappingAlgorithmChanged(Kuesa::ToneMappingAndGammaCorrectionEffect::ToneMapping algorithm)

usesStencilMask : bool

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

Access functions:

bool usesStencilMask() const
void setUsesStencilMask(bool usesStencilMask)

Notifier signal:

void usesStencilMaskChanged(bool usesStencilMask)

viewportRect : QRectF

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

Access functions:

QRectF viewportRect() const
void setViewportRect(const QRectF &viewportRect)

Notifier signal:

void viewportRectChanged(QRectF viewportRect)

zFilling : bool

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

Access functions:

bool zFilling() const
void setZFilling(bool zFilling)

Notifier signal:

void zFillingChanged(bool zFillingChanged)