4#ifndef QSSGDEFAULTMATERIAL_H
5#define QSSGDEFAULTMATERIAL_H
18#include <QtQuick3D/private/qquick3dmaterial_p.h>
19#include <QtQuick3D/private/qquick3dtexture_p.h>
32 Q_PROPERTY(
QColor diffuseColor READ diffuseColor WRITE setDiffuseColor NOTIFY diffuseColorChanged)
35 Q_PROPERTY(
QVector3D emissiveFactor READ emissiveFactor WRITE setEmissiveFactor NOTIFY emissiveFactorChanged)
38 Q_PROPERTY(
QQuick3DTexture *specularReflectionMap READ specularReflectionMap WRITE setSpecularReflectionMap NOTIFY specularReflectionMapChanged)
41 Q_PROPERTY(
QColor specularTint READ specularTint WRITE setSpecularTint NOTIFY specularTintChanged)
43 Q_PROPERTY(
float indexOfRefraction READ indexOfRefraction WRITE setIndexOfRefraction NOTIFY indexOfRefractionChanged)
44 Q_PROPERTY(
float fresnelPower READ fresnelPower WRITE setFresnelPower NOTIFY fresnelPowerChanged)
45 Q_PROPERTY(
float specularAmount READ specularAmount WRITE setSpecularAmount NOTIFY specularAmountChanged)
46 Q_PROPERTY(
float specularRoughness READ specularRoughness WRITE setSpecularRoughness NOTIFY specularRoughnessChanged)
50 Q_PROPERTY(
float opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
55 Q_PROPERTY(
float bumpAmount READ bumpAmount WRITE setBumpAmount NOTIFY bumpAmountChanged)
61 Q_PROPERTY(
float translucentFalloff READ translucentFalloff WRITE setTranslucentFalloff NOTIFY translucentFalloffChanged)
63 Q_PROPERTY(
float diffuseLightWrap READ diffuseLightWrap WRITE setDiffuseLightWrap NOTIFY diffuseLightWrapChanged)
65 Q_PROPERTY(
bool vertexColorsEnabled READ vertexColorsEnabled WRITE setVertexColorsEnabled NOTIFY vertexColorsEnabledChanged)
67 Q_PROPERTY(
float pointSize READ pointSize WRITE setPointSize NOTIFY pointSizeChanged)
73 enum Lighting { NoLighting = 0, FragmentLighting };
76 enum
BlendMode { SourceOver = 0, Screen, Multiply };
85 Lighting lighting()
const;
86 BlendMode blendMode()
const;
87 QColor diffuseColor()
const;
93 SpecularModel specularModel()
const;
94 QColor specularTint()
const;
95 float indexOfRefraction()
const;
96 float fresnelPower()
const;
97 float specularAmount()
const;
98 float specularRoughness()
const;
100 float opacity()
const;
103 float bumpAmount()
const;
107 float translucentFalloff()
const;
108 float diffuseLightWrap()
const;
109 bool vertexColorsEnabled()
const;
110 TextureChannelMapping roughnessChannel()
const;
111 TextureChannelMapping opacityChannel()
const;
112 TextureChannelMapping translucencyChannel()
const;
114 float pointSize()
const;
115 float lineWidth()
const;
121 void setDiffuseColor(
QColor diffuseColor);
123 void setEmissiveFactor(
QVector3D emissiveFactor);
129 void setSpecularTint(
QColor specularTint);
130 void setIndexOfRefraction(
float indexOfRefraction);
131 void setFresnelPower(
float fresnelPower);
132 void setSpecularAmount(
float specularAmount);
133 void setSpecularRoughness(
float specularRoughness);
135 void setOpacity(
float opacity);
138 void setBumpAmount(
float bumpAmount);
142 void setTranslucentFalloff(
float translucentFalloff);
143 void setDiffuseLightWrap(
float diffuseLightWrap);
144 void setVertexColorsEnabled(
bool vertexColorsEnabled);
150 void setPointSize(
float size);
187 void itemChange(ItemChange,
const ItemChangeData &)
override;
190 LightingModeDirty = 0x00000001,
191 BlendModeDirty = 0x00000002,
192 DiffuseDirty = 0x00000004,
193 EmissiveDirty = 0x00000008,
194 SpecularDirty = 0x00000010,
195 OpacityDirty = 0x00000020,
196 BumpDirty = 0x00000040,
197 NormalDirty = 0x00000080,
198 TranslucencyDirty = 0x00000100,
199 VertexColorsDirty = 0x00000200,
200 PointSizeDirty = 0x00000400,
201 LineWidthDirty = 0x00000800
205 Lighting m_lighting = FragmentLighting;
206 BlendMode m_blendMode = SourceOver;
214 SpecularModel m_specularModel =
Default;
216 float m_indexOfRefraction = 1.45f;
217 float m_fresnelPower = 0.0f;
218 float m_specularAmount = 0.0f;
219 float m_specularRoughness = 0.0f;
221 float m_opacity = 1.0f;
224 float m_bumpAmount = 0.0f;
228 float m_translucentFalloff = 0.0f;
229 float m_diffuseLightWrap = 0.0f;
230 bool m_vertexColorsEnabled =
false;
236 float m_pointSize = 1.0f;
237 float m_lineWidth = 1.0f;
239 quint32 m_dirtyAttributes = 0xffffffff;
240 void markDirty(DirtyType
type);
IOBluetoothL2CAPChannel * channel
The QColor class provides colors based on RGB, HSV or CMYK values.
void opacityChanged(float opacity)
void lightingChanged(QQuick3DDefaultMaterial::Lighting lighting)
void diffuseLightWrapChanged(float diffuseLightWrap)
void bumpMapChanged(QQuick3DTexture *bumpMap)
void specularModelChanged(QQuick3DDefaultMaterial::SpecularModel specularModel)
void bumpAmountChanged(float bumpAmount)
void fresnelPowerChanged(float fresnelPower)
void emissiveMapChanged(QQuick3DTexture *emissiveMap)
void diffuseColorChanged(QColor diffuseColor)
void normalMapChanged(QQuick3DTexture *normalMap)
void vertexColorsEnabledChanged(bool vertexColorsEnabled)
void specularTintChanged(QColor specularTint)
void indexOfRefractionChanged(float indexOfRefraction)
void roughnessMapChanged(QQuick3DTexture *roughnessMap)
void diffuseMapChanged(QQuick3DTexture *diffuseMap)
void roughnessChannelChanged(QQuick3DMaterial::TextureChannelMapping channel)
void opacityMapChanged(QQuick3DTexture *opacityMap)
void translucentFalloffChanged(float translucentFalloff)
void specularRoughnessChanged(float specularRoughness)
void opacityChannelChanged(QQuick3DMaterial::TextureChannelMapping channel)
void translucencyChannelChanged(QQuick3DMaterial::TextureChannelMapping channel)
void specularMapChanged(QQuick3DTexture *specularMap)
void emissiveFactorChanged(QVector3D emissiveFactor)
void specularAmountChanged(float specularAmount)
void translucencyMapChanged(QQuick3DTexture *translucencyMap)
void blendModeChanged(QQuick3DDefaultMaterial::BlendMode blendMode)
void specularReflectionMapChanged(QQuick3DTexture *specularReflectionMap)
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
void itemChange(ItemChange, const ItemChangeData &) override
\qmltype Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DObject \inherits QtObject
virtual void markAllDirty()
The QVector3D class represents a vector or vertex in 3D space.
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
#define QML_NAMED_ELEMENT(NAME)
static QT_BEGIN_NAMESPACE const uint Default
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent