QGIS/python/3d/auto_generated/qgs3dexportobject.sip.in
2020-08-31 11:38:02 +10:00

138 lines
4.1 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgs3dexportobject.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class Qgs3DExportObject
{
%Docstring
The Qgs3DExportObject class
Manages the data of each object of the scene (positions, normals, texture coordinates ...) since each object
.. note::
Not available in Python bindings
.. versionadded:: 3.16
%End
%TypeHeaderCode
#include "qgs3dexportobject.h"
%End
public:
enum ObjectType
{
TriangularFaces,
LineStrip,
Points
};
Qgs3DExportObject( const QString &name );
%Docstring
Qgs3DExportObject
Constructs an export object that will be filled with coordinates later
:param parentName:
The name of the parent (Will be useful to define scene hierarchy)
:param parent:
The parent QObject (we use this to delete the Qgs3DExportObject instance once the exporter instance is deallocated)
%End
QString name() const;
%Docstring
Returns the object name
%End
void setName( const QString &name );
%Docstring
Sets the object name
%End
ObjectType type() const;
%Docstring
Returns the object type
%End
void setType( ObjectType type );
%Docstring
Sets the object type
%End
bool smoothEdges();
%Docstring
Returns whether object edges will look smooth
%End
void setSmoothEdges( bool smoothEdges );
%Docstring
Sets whether triangles edges will look smooth
%End
void setupPositionCoordinates( const QVector<float> &positionsBuffer, float scale = 1.0f, const QVector3D &translation = QVector3D( 0, 0, 0 ) );
%Docstring
Sets positions coordinates and does the translation and scaling
%End
void setupFaces( const QVector<uint> &facesIndexes );
%Docstring
Sets the faces in facesIndexes to the faces in the object
%End
void setupLine( const QVector<uint> &facesIndexes );
%Docstring
sets line vertex indexes
%End
void setupNormalCoordinates( const QVector<float> &normalsBuffer );
%Docstring
Sets normal coordinates for each vertex
%End
void setupTextureCoordinates( const QVector<float> &texturesBuffer );
%Docstring
Sets texture coordinates for each vertex
%End
void setupMaterial( QgsAbstractMaterialSettings *material );
%Docstring
Sets the material parameters (diffuse color, shininess...) from phong material
%End
void setTextureImage( const QImage &image );
%Docstring
Sets the texture image used by the object
%End
QImage textureImage();
void objectBounds( float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ );
%Docstring
Updates the box bounds explained with the current object bounds
This expands the bounding box if the current object outside the bounds of the already established bounds
%End
void setMaterialParameter( const QString &parameter, const QString &value );
%Docstring
Sets a material parameter to be exported in the .mtl file
%End
void saveTo( QTextStream &out, float scale, const QVector3D &center );
%Docstring
Saves the current object to the output stream while scaling the object and centering it to be visible in exported scene
%End
QString saveMaterial( QTextStream &mtlOut, const QString &folder );
%Docstring
saves the texture of the object and material information
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgs3dexportobject.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/