summaryrefslogtreecommitdiffstats
path: root/src/render/defaults/qnormaldiffusemapmaterial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/defaults/qnormaldiffusemapmaterial.cpp')
-rw-r--r--src/render/defaults/qnormaldiffusemapmaterial.cpp85
1 files changed, 41 insertions, 44 deletions
diff --git a/src/render/defaults/qnormaldiffusemapmaterial.cpp b/src/render/defaults/qnormaldiffusemapmaterial.cpp
index ce5565020..01de6f4d5 100644
--- a/src/render/defaults/qnormaldiffusemapmaterial.cpp
+++ b/src/render/defaults/qnormaldiffusemapmaterial.cpp
@@ -53,6 +53,10 @@ QT_BEGIN_NAMESPACE
namespace Qt3D {
+/*!
+ \class Qt3D::QNormalDiffuseMapMaterialPrivate
+ \internal
+*/
QNormalDiffuseMapMaterialPrivate::QNormalDiffuseMapMaterialPrivate(QNormalDiffuseMapMaterial *qq)
: QMaterialPrivate(qq)
, m_normalDiffuseEffect(new QEffect())
@@ -155,7 +159,6 @@ void QNormalDiffuseMapMaterialPrivate::init()
*/
/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial()
Constructs a new Qt3D::QNormalDiffuseMapMaterial instance with parent object \a parent.
*/
QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial(QNode *parent)
@@ -171,6 +174,7 @@ QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial(QNode *parent)
d->init();
}
+/*! \internal */
QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial(QNormalDiffuseMapMaterialPrivate &dd, QNode *parent)
: QMaterial(dd, parent)
{
@@ -184,13 +188,16 @@ QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial(QNormalDiffuseMapMaterialPr
d->init();
}
+/*!
+ Destroys the QNormalDiffuseMapMaterial instance.
+*/
QNormalDiffuseMapMaterial::~QNormalDiffuseMapMaterial()
{
}
/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::ambient() const
- \return the current QColor ambient value.
+ \property Qt3D::QNormalDiffuseMapMaterial::ambient
+ Holds the current ambient color.
*/
QColor QNormalDiffuseMapMaterial::ambient() const
{
@@ -199,8 +206,8 @@ QColor QNormalDiffuseMapMaterial::ambient() const
}
/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::specular() const
- \return the current QColor specular value.
+ \property Qt3D::QNormalDiffuseMapMaterial::specular
+ Holds the current specular color.
*/
QColor QNormalDiffuseMapMaterial::specular() const
{
@@ -209,12 +216,18 @@ QColor QNormalDiffuseMapMaterial::specular() const
}
/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::diffuse() const
- \return the current diffuse map texture.
- \b {Note:} By default the diffuse texture has a linear
- magnification filter, a linear mipmap linear minification filter,
- the wrap mode is repeat, the maximum anisotropy is set to 16.0
- and mipmapping is enabled.
+ \property Qt3D::QNormalDiffuseMapMaterial::diffuse
+
+ Holds the current diffuse map texture.
+
+ By default, the diffuse texture has these properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Linear mipmap with mipmapping enabled
+ \li Repeat wrap modeM
+ \li Maximum anisotropy of 16.0
+ \endlist
*/
QAbstractTextureProvider *QNormalDiffuseMapMaterial::diffuse() const
{
@@ -223,11 +236,17 @@ QAbstractTextureProvider *QNormalDiffuseMapMaterial::diffuse() const
}
/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::normal() const
- \return the current normal map texture.
- \b {Note:} By default the normal texture has linear minification
- and magnification filters, the wrap mode is repeat and maximum anisotropy
- is set to 16.0.
+ \property Qt3D::QNormalDiffuseMapMaterial::normal
+
+ Holds the current normal map texture.
+
+ By default, the normal texture has the following properties:
+
+ \list
+ \li Linear minification and magnification filters
+ \li Repeat wrap mode
+ \li Maximum anisotropy of 16.0
+ \endlist
*/
QAbstractTextureProvider *QNormalDiffuseMapMaterial::normal() const
{
@@ -236,8 +255,9 @@ QAbstractTextureProvider *QNormalDiffuseMapMaterial::normal() const
}
/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::shininess() const
- \return the current shininess as a float value.
+ \property Qt3D::QNormalDiffuseMapMaterial::shininess
+
+ Holds the current shininess as a float value.
*/
float QNormalDiffuseMapMaterial::shininess() const
{
@@ -246,8 +266,9 @@ float QNormalDiffuseMapMaterial::shininess() const
}
/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::textureScale() const
- \return the current texture scale.
+ \property Qt3D::QNormalDiffuseMapMaterial::textureScale
+
+ Holds the current texture scale as a float value.
*/
float QNormalDiffuseMapMaterial::textureScale() const
{
@@ -255,60 +276,36 @@ float QNormalDiffuseMapMaterial::textureScale() const
return d->m_textureScaleParameter->value().toFloat();
}
-/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::setAmbient(const QColor &ambient)
- Sets the current ambient color to \a ambient
- */
void QNormalDiffuseMapMaterial::setAmbient(const QColor &ambient)
{
Q_D(QNormalDiffuseMapMaterial);
d->m_ambientParameter->setValue(ambient);
}
-/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::setSpecular(const QColor &specular)
- Sets the current specular color to \a specular.
- */
void QNormalDiffuseMapMaterial::setSpecular(const QColor &specular)
{
Q_D(QNormalDiffuseMapMaterial);
d->m_specularParameter->setValue(specular);
}
-/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::setDiffuse(QTexture *diffuse)
- Sets the current diffuse map to \a diffuse.
- */
void QNormalDiffuseMapMaterial::setDiffuse(QAbstractTextureProvider *diffuse)
{
Q_D(QNormalDiffuseMapMaterial);
d->m_diffuseParameter->setValue(QVariant::fromValue(diffuse));
}
-/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::setNormal(QTexture *normal)
- Sets the current normal map to \a normal.
- */
void QNormalDiffuseMapMaterial::setNormal(QAbstractTextureProvider *normal)
{
Q_D(QNormalDiffuseMapMaterial);
d->m_normalParameter->setValue(QVariant::fromValue(normal));
}
-/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::setShininess(float shininess)
- Sets the current shininess value to \a shininess.
- */
void QNormalDiffuseMapMaterial::setShininess(float shininess)
{
Q_D(QNormalDiffuseMapMaterial);
d->m_shininessParameter->setValue(shininess);
}
-/*!
- \fn Qt3D::QNormalDiffuseMapMaterial::setTextureScale(float textureScale)
- Sets the current texture scale to \a textureScale.
- */
void QNormalDiffuseMapMaterial::setTextureScale(float textureScale)
{
Q_D(QNormalDiffuseMapMaterial);