16 #ifndef QGSPHONGMATERIALSETTINGS_H 17 #define QGSPHONGMATERIALSETTINGS_H 39 : mAmbient( QColor::fromRgbF( 0.1f, 0.1f, 0.1f, 1.0f ) )
40 , mDiffuse( QColor::fromRgbF( 0.7f, 0.7f, 0.7f, 1.0f ) )
41 , mSpecular( QColor::fromRgbF( 1.0f, 1.0f, 1.0f, 1.0f ) )
46 QColor
ambient()
const {
return mAmbient; }
48 QColor
diffuse()
const {
return mDiffuse; }
55 void setAmbient(
const QColor &ambient ) { mAmbient = ambient; }
57 void setDiffuse(
const QColor &diffuse ) { mDiffuse = diffuse; }
59 void setSpecular(
const QColor &specular ) { mSpecular = specular; }
64 void readXml(
const QDomElement &elem );
66 void writeXml( QDomElement &elem )
const;
70 return mAmbient == other.mAmbient &&
71 mDiffuse == other.mDiffuse &&
72 mSpecular == other.mSpecular &&
73 mShininess == other.mShininess;
80 float mShininess = 0.0f;
84 #endif // QGSPHONGMATERIALSETTINGS_H float shininess() const
Returns shininess of the surface.
QColor specular() const
Returns specular color component.
3 Basic shading material used for rendering based on the Phong shading model with three color compone...
bool operator==(const QgsPhongMaterialSettings &other) const
QgsPhongMaterialSettings()
void setShininess(float shininess)
Sets shininess of the surface.
QColor ambient() const
Returns ambient color component.
void setDiffuse(const QColor &diffuse)
Sets diffuse color component.
QColor diffuse() const
Returns diffuse color component.
void setAmbient(const QColor &ambient)
Sets ambient color component.
void setSpecular(const QColor &specular)
Sets specular color component.