Kuesa Runtime

GLTF2MaterialProperties Class

class Kuesa::GLTF2MaterialProperties

GLTF2MaterialProperties is a base class holding properties common to all glTF2 Materials. More...

Header: #include <Kuesa/GLTF2MaterialProperties>
Since: Kuesa 1.1
Inherited By:

Kuesa::Iro2AlphaEquiRectProperties, Kuesa::Iro2AlphaSemProperties, Kuesa::Iro2DiffuseEquiRectProperties, Kuesa::Iro2DiffuseSemProperties, Kuesa::Iro2GlassEquiRectProperties, Kuesa::Iro2GlassSemProperties, Kuesa::Iro2MatteAlphaProperties, Kuesa::Iro2PlanarReflectionEquiRectProperties, Kuesa::Iro2PlanarReflectionSemProperties, Kuesa::IroDiffuseAlphaProperties, Kuesa::IroDiffuseHemiProperties, Kuesa::IroDiffuseProperties, Kuesa::IroGlassAddProperties, Kuesa::IroMatteAddProperties, Kuesa::IroMatteAlphaProperties, Kuesa::IroMatteBackgroundProperties, Kuesa::IroMatteMultProperties, Kuesa::IroMatteOpaqueProperties, Kuesa::IroMatteSkyboxProperties, Kuesa::MetallicRoughnessProperties, and Kuesa::UnlitProperties

This class was introduced in Kuesa 1.1.

Properties

Public Functions

float alphaCutoff() const
QColor baseColorFactor() const
Qt3DRender::QAbstractTexture *baseColorMap() const
bool isBaseColorUsingTexCoord1() const
bool receivesShadows() const

Public Slots

void setAlphaCutoff(float alphaCutoff)
void setBaseColorFactor(const QColor &baseColorFactor)
void setBaseColorMap(Qt3DRender::QAbstractTexture *baseColorMap)
void setBaseColorUsesTexCoord1(bool baseColorUsesTexCoord1)
void setReceivesShadows(bool receivesShadows)

Signals

void alphaCutoffChanged(float alphaCutoff)
void baseColorFactorChanged(const QColor &baseColorFactor)
void baseColorMapChanged(Qt3DRender::QAbstractTexture *baseColorMap)
void baseColorUsesTexCoord1Changed(bool)
void receivesShadowsChanged(bool receivesShadows)

Detailed Description

A GLTF2MaterialProperties consists of the following base properties:

Property Documentation

alphaCutoff : float

Alpha cutoff threshold. Any fragment with an alpha value higher than this property will be considered opaque. Any fragment with an alpha value lower than this property will be discarded and wont have any effect on the final result. For alphaCutoff to have any effect, it must be activated.

Access functions:

float alphaCutoff() const
void setAlphaCutoff(float alphaCutoff)

Notifier signal:

void alphaCutoffChanged(float alphaCutoff)

baseColorFactor : QColor

Specifies the baseColorFactor of the material

Access functions:

QColor baseColorFactor() const
void setBaseColorFactor(const QColor &baseColorFactor)

Notifier signal:

void baseColorFactorChanged(const QColor &baseColorFactor)

baseColorMap : Qt3DRender::QAbstractTexture*

Specifies a texture to be used as baseColorFactor. The content of the texture is expected to be in sRGB color space.

Note: If this property is nullptr and was set to a non nullptr value, this will trigger a recompilation of the shader. If it was a non nullptr value and is set to nullptr, it will also trigger a recompilation of the shader.

Access functions:

Qt3DRender::QAbstractTexture *baseColorMap() const
void setBaseColorMap(Qt3DRender::QAbstractTexture *baseColorMap)

Notifier signal:

void baseColorMapChanged(Qt3DRender::QAbstractTexture *baseColorMap)

receivesShadows : bool

Specifies whether a surface should show any shadows that are cast on it. This Default is true

Access functions:

bool receivesShadows() const
void setReceivesShadows(bool receivesShadows)

Notifier signal:

void receivesShadowsChanged(bool receivesShadows)