16 #ifndef Qgs3DExportObject_H
17 #define Qgs3DExportObject_H
20 #include <QTextStream>
24 #include <Qt3DRender/QAttribute>
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;
122 #endif // Qgs3DExportObject_H