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);
186 void markAllDirty()
override;
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);