16#ifndef Qgs3DExportObject_H
17#define Qgs3DExportObject_H
59 QString
name()
const {
return mName; }
61 void setName(
const QString &name ) { mName = name; }
74 void setupPositionCoordinates(
const QVector<float> &positionsBuffer,
float scale = 1.0f,
const QVector3D &translation = QVector3D( 0, 0, 0 ) );
76 void setupFaces(
const QVector<uint> &facesIndexes );
78 void setupLine(
const QVector<uint> &facesIndexes );
81 void setupNormalCoordinates(
const QVector<float> &normalsBuffer );
83 void setupTextureCoordinates(
const QVector<float> &texturesBuffer );
97 void objectBounds(
float &minX,
float &minY,
float &minZ,
float &maxX,
float &maxY,
float &maxZ );
100 void setMaterialParameter(
const QString ¶meter,
const QString &value ) { mMaterialParameters[parameter] = value; }
103 void saveTo( QTextStream &out,
float scale,
const QVector3D ¢er );
105 QString saveMaterial( QTextStream &mtlOut,
const QString &folder );
109 ObjectType mType = ObjectType::TriangularFaces;
111 QVector<float> mVertexPosition;
112 QVector<float> mNormals;
113 QVector<float> mTexturesUV;
114 QVector<unsigned int> mIndexes;
115 QMap<QString, QString> mMaterialParameters;
117 QImage mTextureImage;
119 bool mSmoothEdges =
false;
Manages the data of each object of the scene (positions, normals, texture coordinates ....
QImage textureImage() const
Returns the texture image used by the object.
void setMaterialParameter(const QString ¶meter, const QString &value)
Sets a material parameter to be exported in the .mtl file.
void setType(ObjectType type)
Sets the object type.
Qgs3DExportObject(const QString &name)
Qgs3DExportObject Constructs an export object that will be filled with coordinates later.
ObjectType type() const
Returns the object type.
ObjectType
The type of exported geometry.
QString name() const
Returns the object name.
void setTextureImage(const QImage &image)
Sets the texture image used by the object.
bool smoothEdges() const
Returns whether object edges will look smooth.
void setName(const QString &name)
Sets the object name.
void setSmoothEdges(bool smoothEdges)
Sets whether triangles edges will look smooth.
@ Points
Point based rendering, requires point data.