qgs3dexportobject: Merge material methods

`setMaterialParameter` is only used by `setupMaterial`.
This commit is contained in:
Jean Felder 2025-09-11 15:33:58 +02:00 committed by Nyall Dawson
parent cda3a9f338
commit c33f01b076
2 changed files with 2 additions and 5 deletions

View File

@ -103,7 +103,7 @@ void Qgs3DExportObject::setupMaterial( QgsAbstractMaterialSettings *material )
QMap<QString, QString> parameters = material->toExportParameters();
for ( auto it = parameters.begin(); it != parameters.end(); ++it )
{
setMaterialParameter( it.key(), it.value() );
mMaterialParameters[it.key()] = it.value();
}
}

View File

@ -82,7 +82,7 @@ class _3D_EXPORT Qgs3DExportObject
void setupNormalCoordinates( const QVector<float> &normalsBuffer, const QMatrix4x4 &transform );
//! Sets texture coordinates for each vertex
void setupTextureCoordinates( const QVector<float> &texturesBuffer );
//! Sets the material parameters (diffuse color, shininess...) from phong material
//! Sets the material parameters (diffuse color, shininess...) to be exported in the .mtl file
void setupMaterial( QgsAbstractMaterialSettings *material );
//! Sets the texture image used by the object
@ -97,9 +97,6 @@ class _3D_EXPORT Qgs3DExportObject
*/
void objectBounds( float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ );
//! Sets a material parameter to be exported in the .mtl file
void setMaterialParameter( const QString &parameter, const QString &value ) { mMaterialParameters[parameter] = value; }
//! Saves the current object to the output stream while scaling the object and centering it to be visible in exported scene
void saveTo( QTextStream &out, float scale, const QVector3D &center, int precision = 6 );
//! saves the texture of the object and material information