mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
qgs3dexportobject: Merge material methods
`setMaterialParameter` is only used by `setupMaterial`.
This commit is contained in:
parent
cda3a9f338
commit
c33f01b076
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 ¶meter, 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 ¢er, int precision = 6 );
|
||||
//! saves the texture of the object and material information
|
||||
|
Loading…
x
Reference in New Issue
Block a user