7#include <QtQuick3DRuntimeRender/private/qssgrenderdefaultmaterial_p.h>
8#include <QtQuick3DUtils/private/qssgutils_p.h>
395 , m_diffuseColor(
Qt::white)
396 , m_specularTint(
Qt::white)
415 return m_diffuseColor;
425 return m_emissiveFactor;
430 return m_emissiveMap;
435 return m_specularReflectionMap;
440 return m_specularMap;
445 return m_specularModel;
450 return m_specularTint;
455 return m_indexOfRefraction;
460 return m_fresnelPower;
465 return m_specularAmount;
470 return m_specularRoughness;
475 return m_roughnessMap;
505 return m_translucencyMap;
510 return m_translucentFalloff;
515 return m_diffuseLightWrap;
520 return m_vertexColorsEnabled;
525 return m_roughnessChannel;
530 return m_opacityChannel;
535 return m_translucencyChannel;
550 m_dirtyAttributes = 0xffffffff;
562 markDirty(LightingModeDirty);
572 markDirty(BlendModeDirty);
582 markDirty(DiffuseDirty);
594 markDirty(DiffuseDirty);
604 markDirty(EmissiveDirty);
616 markDirty(EmissiveDirty);
628 markDirty(SpecularDirty);
640 markDirty(SpecularDirty);
650 markDirty(SpecularDirty);
660 markDirty(SpecularDirty);
670 markDirty(SpecularDirty);
680 markDirty(SpecularDirty);
690 markDirty(SpecularDirty);
700 markDirty(SpecularDirty);
712 markDirty(SpecularDirty);
728 markDirty(OpacityDirty);
740 markDirty(OpacityDirty);
752 markDirty(BumpDirty);
762 markDirty(BumpDirty);
774 markDirty(NormalDirty);
786 markDirty(TranslucencyDirty);
796 markDirty(TranslucencyDirty);
806 markDirty(DiffuseDirty);
811 if (m_vertexColorsEnabled == vertexColors)
814 m_vertexColorsEnabled = vertexColors;
816 markDirty(VertexColorsDirty);
821 if (m_roughnessChannel ==
channel)
825 markDirty(SpecularDirty);
830 if (m_opacityChannel ==
channel)
834 markDirty(OpacityDirty);
839 if (m_translucencyChannel ==
channel)
841 m_translucencyChannel =
channel;
843 markDirty(TranslucencyDirty);
852 markDirty(PointSizeDirty);
861 markDirty(LineWidthDirty);
880 if (m_dirtyAttributes & LightingModeDirty) {
883 m_dirtyAttributes |= EmissiveDirty;
886 if (m_dirtyAttributes & BlendModeDirty)
889 if (m_dirtyAttributes & DiffuseDirty) {
890 material->
color = QSSGUtils::color::sRGBToLinear(m_diffuseColor);
899 if (m_dirtyAttributes & EmissiveDirty) {
908 if (m_dirtyAttributes & SpecularDirty) {
909 if (!m_specularReflectionMap)
921 material->
ior = m_indexOfRefraction;
933 if (m_dirtyAttributes & OpacityDirty) {
942 if (m_dirtyAttributes & BumpDirty) {
950 if (m_dirtyAttributes & NormalDirty) {
957 if (m_dirtyAttributes & TranslucencyDirty) {
958 if (!m_translucencyMap)
966 if (m_dirtyAttributes & VertexColorsDirty)
969 if (m_dirtyAttributes & PointSizeDirty)
972 if (m_dirtyAttributes & LineWidthDirty)
975 m_dirtyAttributes = 0;
982 if (change == QQuick3DObject::ItemSceneChange)
983 updateSceneManager(
value.sceneManager);
1012void QQuick3DDefaultMaterial::markDirty(QQuick3DDefaultMaterial::DirtyType
type)
IOBluetoothL2CAPChannel * channel
The QColor class provides colors based on RGB, HSV or CMYK values.
void setFresnelPower(float fresnelPower)
void setSpecularReflectionMap(QQuick3DTexture *specularReflectionMap)
void opacityChanged(float opacity)
~QQuick3DDefaultMaterial() override
QQuick3DTexture * emissiveMap
QQuick3DTexture * roughnessMap
void setSpecularTint(QColor specularTint)
void lightingChanged(QQuick3DDefaultMaterial::Lighting lighting)
QQuick3DDefaultMaterial(QQuick3DObject *parent=nullptr)
\qmltype DefaultMaterial \inherits Material \inqmlmodule QtQuick3D
void setDiffuseLightWrap(float diffuseLightWrap)
void setRoughnessChannel(QQuick3DMaterial::TextureChannelMapping channel)
QQuick3DTexture * specularReflectionMap
void setVertexColorsEnabled(bool vertexColorsEnabled)
void diffuseLightWrapChanged(float diffuseLightWrap)
QQuick3DTexture * translucencyMap
void bumpMapChanged(QQuick3DTexture *bumpMap)
void setTranslucencyChannel(QQuick3DMaterial::TextureChannelMapping channel)
void specularModelChanged(QQuick3DDefaultMaterial::SpecularModel specularModel)
void setLighting(QQuick3DDefaultMaterial::Lighting lighting)
void bumpAmountChanged(float bumpAmount)
QQuick3DTexture * bumpMap
QQuick3DTexture * normalMap
void fresnelPowerChanged(float fresnelPower)
void setBumpMap(QQuick3DTexture *bumpMap)
void setEmissiveMap(QQuick3DTexture *emissiveMap)
QQuick3DMaterial::TextureChannelMapping translucencyChannel
void setBumpAmount(float bumpAmount)
void emissiveMapChanged(QQuick3DTexture *emissiveMap)
void diffuseColorChanged(QColor diffuseColor)
void setEmissiveFactor(QVector3D emissiveFactor)
void setOpacityMap(QQuick3DTexture *opacityMap)
void setSpecularRoughness(float specularRoughness)
void setNormalMap(QQuick3DTexture *normalMap)
void normalMapChanged(QQuick3DTexture *normalMap)
void vertexColorsEnabledChanged(bool vertexColorsEnabled)
void itemChange(ItemChange, const ItemChangeData &) override
QQuick3DTexture * opacityMap
QQuick3DTexture * specularMap
void markAllDirty() override
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
void setOpacity(float opacity)
void setSpecularAmount(float specularAmount)
void specularTintChanged(QColor specularTint)
void indexOfRefractionChanged(float indexOfRefraction)
void roughnessMapChanged(QQuick3DTexture *roughnessMap)
void diffuseMapChanged(QQuick3DTexture *diffuseMap)
void setPointSize(float size)
void roughnessChannelChanged(QQuick3DMaterial::TextureChannelMapping channel)
QQuick3DTexture * diffuseMap
QQuick3DMaterial::TextureChannelMapping roughnessChannel
void setSpecularModel(QQuick3DDefaultMaterial::SpecularModel specularModel)
void setBlendMode(QQuick3DDefaultMaterial::BlendMode blendMode)
void opacityMapChanged(QQuick3DTexture *opacityMap)
void setRoughnessMap(QQuick3DTexture *roughnessMap)
void setTranslucencyMap(QQuick3DTexture *translucencyMap)
void translucentFalloffChanged(float translucentFalloff)
void setDiffuseMap(QQuick3DTexture *diffuseMap)
void specularRoughnessChanged(float specularRoughness)
void opacityChannelChanged(QQuick3DMaterial::TextureChannelMapping channel)
void translucencyChannelChanged(QQuick3DMaterial::TextureChannelMapping channel)
SpecularModel specularModel
void setOpacityChannel(QQuick3DMaterial::TextureChannelMapping channel)
void setIndexOfRefraction(float indexOfRefraction)
void setSpecularMap(QQuick3DTexture *specularMap)
void setTranslucentFalloff(float translucentFalloff)
void specularMapChanged(QQuick3DTexture *specularMap)
void emissiveFactorChanged(QVector3D emissiveFactor)
void specularAmountChanged(float specularAmount)
void translucencyMapChanged(QQuick3DTexture *translucencyMap)
QQuick3DMaterial::TextureChannelMapping opacityChannel
void setLineWidth(float width)
void setDiffuseColor(QColor diffuseColor)
void blendModeChanged(QQuick3DDefaultMaterial::BlendMode blendMode)
void specularReflectionMapChanged(QQuick3DTexture *specularReflectionMap)
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
void refSceneManager(QQuick3DSceneManager &)
static void attachWatcher(Context *context, Setter setter, Object3D *newO, Object3D *oldO)
Attach a object-destroyed-watcher to an object that's not owned.
\qmltype Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DObject \inherits QtObject
virtual void markAllDirty()
QSSGRenderImage * getRenderImage()
The QVector3D class represents a vector or vertex in 3D space.
constexpr QVector3D toVector3D() const noexcept
Returns the 3D vector form of this 4D vector, dropping the w coordinate.
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLenum GLenum mapping
QSSGRenderImage * opacityMap
QSSGRenderImage * roughnessMap
TextureChannelMapping translucencyChannel
QSSGRenderDefaultMaterial::MaterialSpecularModel specularModel
QSSGRenderImage * specularReflection
QSSGRenderImage * colorMap
QSSGRenderImage * bumpMap
QSSGRenderDefaultMaterial::MaterialBlendMode blendMode
QSSGRenderImage * translucencyMap
TextureChannelMapping opacityChannel
MaterialLighting lighting
TextureChannelMapping roughnessChannel
QSSGRenderImage * normalMap
QSSGRenderImage * specularMap
QSSGRenderImage * emissiveMap