QGIS/python/3d/auto_generated/qgsphongmaterialsettings.sip.in
2020-07-28 18:00:20 +01:00

196 lines
5.4 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsphongmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPhongMaterialSettings : QgsAbstractMaterialSettings
{
%Docstring
Basic shading material used for rendering based on the Phong shading model
with three color components: ambient, diffuse and specular.
.. warning::
This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings as a tech preview only.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsphongmaterialsettings.h"
%End
public:
QgsPhongMaterialSettings();
%Docstring
Constructor for QgsPhongMaterialSettings.
%End
virtual QString type() const;
static QgsAbstractMaterialSettings *create() /Factory/;
%Docstring
Returns a new instance of QgsPhongMaterialSettings.
%End
virtual QgsPhongMaterialSettings *clone() const /Factory/;
QColor ambient() const;
%Docstring
Returns ambient color component
%End
QColor diffuse() const;
%Docstring
Returns diffuse color component
%End
QColor specular() const;
%Docstring
Returns specular color component
%End
float shininess() const;
%Docstring
Returns shininess of the surface
%End
virtual QMap<QString, QString> toExportParameters() const;
bool diffuseTextureEnabled() const;
%Docstring
Returns whether the diffuse texture is used.
.. note::
Diffuse textures will only be used at render time if :py:func:`~QgsPhongMaterialSettings.diffuseTextureEnabled` is ``True``
and a :py:func:`~QgsPhongMaterialSettings.texturePath` is non-empty.
.. seealso:: :py:func:`shouldUseDiffuseTexture`
.. seealso:: :py:func:`setDiffuseTextureEnabled`
.. seealso:: :py:func:`texturePath`
%End
bool shouldUseDiffuseTexture() const;
%Docstring
Returns whether the diffuse texture should be used during rendering.
Diffuse textures will only be used at render time if :py:func:`~QgsPhongMaterialSettings.diffuseTextureEnabled` is ``True``
and a :py:func:`~QgsPhongMaterialSettings.texturePath` is non-empty.
.. seealso:: :py:func:`diffuseTextureEnabled`
.. seealso:: :py:func:`texturePath`
%End
QString texturePath() const;
%Docstring
Returns the diffuse texture path.
.. note::
Diffuse textures will only be used at render time if :py:func:`~QgsPhongMaterialSettings.diffuseTextureEnabled` is ``True``
and a :py:func:`~QgsPhongMaterialSettings.texturePath` is non-empty.
.. seealso:: :py:func:`setTexturePath`
.. seealso:: :py:func:`diffuseTextureEnabled`
%End
float textureScale() const;
%Docstring
Returns the texture scale
The texture scale changes the size of the displayed texture in the 3D scene
If the texture scale is less than 1 the texture will be stretched
%End
float textureRotation() const;
%Docstring
Returns the texture's rotation in degrees
%End
void setAmbient( const QColor &ambient );
%Docstring
Sets ambient color component
%End
void setDiffuse( const QColor &diffuse );
%Docstring
Sets diffuse color component
%End
void setSpecular( const QColor &specular );
%Docstring
Sets specular color component
%End
void setShininess( float shininess );
%Docstring
Sets shininess of the surface
%End
void setDiffuseTextureEnabled( bool used );
%Docstring
Sets whether the diffuse texture is enabled.
.. note::
Diffuse textures will only be used at render time if :py:func:`~QgsPhongMaterialSettings.diffuseTextureEnabled` is ``True``
and a :py:func:`~QgsPhongMaterialSettings.texturePath` is non-empty.
.. seealso:: :py:func:`diffuseTextureEnabled`
.. seealso:: :py:func:`setTexturePath`
%End
void setTexturePath( const QString &path );
%Docstring
Sets the ``path`` of the texture.
.. note::
Diffuse textures will only be used at render time if :py:func:`~QgsPhongMaterialSettings.diffuseTextureEnabled` is ``True``
and a :py:func:`~QgsPhongMaterialSettings.texturePath` is non-empty.
.. seealso:: :py:func:`texturePath`
.. seealso:: :py:func:`setDiffuseTextureEnabled`
%End
void setTextureScale( float scale );
%Docstring
Sets the texture scale
The texture scale changes the size of the displayed texture in the 3D scene
If the texture scale is less than 1 the texture will be stretched
%End
void setTextureRotation( float rotation );
%Docstring
Sets the texture rotation in degrees
%End
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const;
bool operator==( const QgsPhongMaterialSettings &other ) const;
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsphongmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/