7#include <QtQuick3DRuntimeRender/private/qssgrenderdefaultmaterial_p.h>
8#include <QtQuick3DUtils/private/qssgutils_p.h>
389 , m_diffuseColor(
Qt::white)
390 , m_specularTint(
Qt::white)
409 return m_diffuseColor;
419 return m_emissiveFactor;
424 return m_emissiveMap;
429 return m_specularReflectionMap;
434 return m_specularMap;
439 return m_specularModel;
444 return m_specularTint;
449 return m_indexOfRefraction;
454 return m_fresnelPower;
459 return m_specularAmount;
464 return m_specularRoughness;
469 return m_roughnessMap;
499 return m_translucencyMap;
504 return m_translucentFalloff;
509 return m_diffuseLightWrap;
514 return m_vertexColorsEnabled;
519 return m_roughnessChannel;
524 return m_opacityChannel;
529 return m_translucencyChannel;
544 m_dirtyAttributes = 0xffffffff;
556 markDirty(LightingModeDirty);
566 markDirty(BlendModeDirty);
576 markDirty(DiffuseDirty);
588 markDirty(DiffuseDirty);
598 markDirty(EmissiveDirty);
610 markDirty(EmissiveDirty);
622 markDirty(SpecularDirty);
634 markDirty(SpecularDirty);
644 markDirty(SpecularDirty);
654 markDirty(SpecularDirty);
664 markDirty(SpecularDirty);
674 markDirty(SpecularDirty);
684 markDirty(SpecularDirty);
694 markDirty(SpecularDirty);
706 markDirty(SpecularDirty);
722 markDirty(OpacityDirty);
734 markDirty(OpacityDirty);
746 markDirty(BumpDirty);
756 markDirty(BumpDirty);
768 markDirty(NormalDirty);
780 markDirty(TranslucencyDirty);
790 markDirty(TranslucencyDirty);
800 markDirty(DiffuseDirty);
805 if (m_vertexColorsEnabled == vertexColors)
808 m_vertexColorsEnabled = vertexColors;
810 markDirty(VertexColorsDirty);
815 if (m_roughnessChannel ==
channel)
819 markDirty(SpecularDirty);
824 if (m_opacityChannel ==
channel)
828 markDirty(OpacityDirty);
833 if (m_translucencyChannel ==
channel)
835 m_translucencyChannel =
channel;
837 markDirty(TranslucencyDirty);
846 markDirty(PointSizeDirty);
855 markDirty(LineWidthDirty);
874 if (m_dirtyAttributes & LightingModeDirty) {
877 m_dirtyAttributes |= EmissiveDirty;
880 if (m_dirtyAttributes & BlendModeDirty)
883 if (m_dirtyAttributes & DiffuseDirty) {
884 material->
color = color::sRGBToLinear(m_diffuseColor);
893 if (m_dirtyAttributes & EmissiveDirty) {
902 if (m_dirtyAttributes & SpecularDirty) {
903 if (!m_specularReflectionMap)
915 material->
ior = m_indexOfRefraction;
927 if (m_dirtyAttributes & OpacityDirty) {
936 if (m_dirtyAttributes & BumpDirty) {
944 if (m_dirtyAttributes & NormalDirty) {
951 if (m_dirtyAttributes & TranslucencyDirty) {
952 if (!m_translucencyMap)
960 if (m_dirtyAttributes & VertexColorsDirty)
963 if (m_dirtyAttributes & PointSizeDirty)
966 if (m_dirtyAttributes & LineWidthDirty)
969 m_dirtyAttributes = 0;
976 if (change == QQuick3DObject::ItemSceneChange)
977 updateSceneManager(
value.sceneManager);
1006void 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
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent