16 #ifndef QGSTESSELLATEDPOLYGONGEOMETRY_H 17 #define QGSTESSELLATEDPOLYGONGEOMETRY_H 22 #include <Qt3DRender/QGeometry> 63 void setPolygons(
const QList<QgsPolygon *> &polygons,
const QList<QgsFeatureId> &featureIds,
const QgsPointXY &origin,
float extrusionHeight,
const QList<float> &extrusionHeightPerPolygon = QList<float>() );
66 QgsFeatureId triangleIndexToFeatureId( uint triangleIndex )
const;
70 Qt3DRender::QAttribute *mPositionAttribute =
nullptr;
71 Qt3DRender::QAttribute *mNormalAttribute =
nullptr;
72 Qt3DRender::QBuffer *mVertexBuffer =
nullptr;
74 QVector<QgsFeatureId> mTriangleIndexFids;
75 QVector<uint> mTriangleIndexStartingIndices;
77 bool mWithNormals =
true;
78 bool mInvertNormals =
false;
79 bool mAddBackFaces =
false;
82 #endif // QGSTESSELLATEDPOLYGONGEOMETRY_H void setInvertNormals(bool invert)
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwi...
A class to represent a 2D point.
bool addBackFaces() const
Returns whether also triangles facing the other side will be created.
bool invertNormals() const
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-cloc...
3 Class derived from Qt3DRender::QGeometry that represents polygons tessellated into 3D geometry...
void setAddBackFaces(bool add)
Sets whether also triangles facing the other side will be created.