16 #ifndef Qgs3DExportObject_H
17 #define Qgs3DExportObject_H
20 #include <QTextStream>
24 #include <Qt3DRender/QAttribute>
63 QString
name()
const {
return mName; }
65 void setName(
const QString &name ) { mName = name; }
78 void setupPositionCoordinates(
const QVector<float> &positionsBuffer,
float scale = 1.0f,
const QVector3D &translation = QVector3D( 0, 0, 0 ) );
80 void setupFaces(
const QVector<uint> &facesIndexes );
82 void setupLine(
const QVector<uint> &facesIndexes );
85 void setupNormalCoordinates(
const QVector<float> &normalsBuffer );
87 void setupTextureCoordinates(
const QVector<float> &texturesBuffer );
101 void objectBounds(
float &minX,
float &minY,
float &minZ,
float &maxX,
float &maxY,
float &maxZ );
104 void setMaterialParameter(
const QString ¶meter,
const QString &value ) { mMaterialParameters[parameter] = value; }
107 void saveTo( QTextStream &out,
float scale,
const QVector3D ¢er );
109 QString saveMaterial( QTextStream &mtlOut,
const QString &folder );
113 ObjectType mType = ObjectType::TriangularFaces;
115 QVector<float> mVertexPosition;
116 QVector<float> mNormals;
117 QVector<float> mTexturesUV;
118 QVector<unsigned int> mIndexes;
119 QMap<QString, QString> mMaterialParameters;
121 QImage mTextureImage;
123 bool mSmoothEdges =
false;
126 #endif // Qgs3DExportObject_H