|
QGIS API Documentation 3.99.0-Master (a5475b57e34)
|
Qt3DRender::QGeometry subclass that represents polygons tessellated into 3D geometry. More...
#include <qgstessellatedpolygongeometry.h>

Public Member Functions | |
| QgsTessellatedPolygonGeometry (bool _withNormals=true, bool invertNormals=false, bool addBackFaces=false, bool addTextureCoords=false, QNode *parent=nullptr) | |
| Constructor. | |
| bool | addBackFaces () const |
| Returns whether also triangles facing the other side will be created. | |
| QVector< QgsFeatureId > | featureIds () const |
| Returns included feature ids. | |
| bool | invertNormals () const |
| Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders). | |
| void | setAddBackFaces (bool add) |
| Sets whether also triangles facing the other side will be created. | |
| void | setAddTextureCoords (bool add) |
| Sets whether the texture coordinates will be generated. | |
| void | setIndexBufferData (const QByteArray &indexBufferData, size_t indexCount) |
| Sets index buffer data. | |
| void | setInvertNormals (bool invert) |
| Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders). | |
| void | setVertexBufferData (const QByteArray &vertexBufferData, int vertexCount, const QVector< QgsFeatureId > &triangleIndexFids, const QVector< uint > &triangleIndexStartingIndices) |
| Initializes vertex buffer (and other members) from data that were already tessellated. | |
| QVector< uint > | triangleIndexStartingIndices () const |
| Returns triangle index for features. For a feature featureIds()[i], matching triangles start at triangleIndexStartingIndices()[i]. | |
| QgsFeatureId | triangleIndexToFeatureId (uint triangleIndex) const |
| Returns ID of the feature to which given triangle index belongs (used for picking). | |
Friends | |
| class | Qgs3DSceneExporter |
Qt3DRender::QGeometry subclass that represents polygons tessellated into 3D geometry.
Takes a list of polygons as input, internally it does tessellation and writes output to the internal vertex buffer. Optionally it can add "walls" if the extrusion height is non-zero.
Definition at line 45 of file qgstessellatedpolygongeometry.h.
| QgsTessellatedPolygonGeometry::QgsTessellatedPolygonGeometry | ( | bool | _withNormals = true, |
| bool | invertNormals = false, | ||
| bool | addBackFaces = false, | ||
| bool | addTextureCoords = false, | ||
| QNode * | parent = nullptr ) |
Constructor.
Definition at line 25 of file qgstessellatedpolygongeometry.cpp.
|
inline |
Returns whether also triangles facing the other side will be created.
Useful if input data have inconsistent order of vertices
Definition at line 61 of file qgstessellatedpolygongeometry.h.
|
inline |
Returns included feature ids.
Definition at line 95 of file qgstessellatedpolygongeometry.h.
|
inline |
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders).
Definition at line 53 of file qgstessellatedpolygongeometry.h.
|
inline |
Sets whether also triangles facing the other side will be created.
Useful if input data have inconsistent order of vertices
Definition at line 67 of file qgstessellatedpolygongeometry.h.
|
inline |
Sets whether the texture coordinates will be generated.
Definition at line 73 of file qgstessellatedpolygongeometry.h.
| void QgsTessellatedPolygonGeometry::setIndexBufferData | ( | const QByteArray & | indexBufferData, |
| size_t | indexCount ) |
Sets index buffer data.
Definition at line 96 of file qgstessellatedpolygongeometry.cpp.
|
inline |
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders).
Definition at line 55 of file qgstessellatedpolygongeometry.h.
| void QgsTessellatedPolygonGeometry::setVertexBufferData | ( | const QByteArray & | vertexBufferData, |
| int | vertexCount, | ||
| const QVector< QgsFeatureId > & | triangleIndexFids, | ||
| const QVector< uint > & | triangleIndexStartingIndices ) |
Initializes vertex buffer (and other members) from data that were already tessellated.
This is an alternative to setPolygons() - this method does not do any expensive work in the body.
Definition at line 83 of file qgstessellatedpolygongeometry.cpp.
|
inline |
Returns triangle index for features. For a feature featureIds()[i], matching triangles start at triangleIndexStartingIndices()[i].
Definition at line 98 of file qgstessellatedpolygongeometry.h.
| QgsFeatureId QgsTessellatedPolygonGeometry::triangleIndexToFeatureId | ( | uint | triangleIndex | ) | const |
Returns ID of the feature to which given triangle index belongs (used for picking).
In case such triangle index does not match any feature, FID_NULL is returned.
Definition at line 132 of file qgstessellatedpolygongeometry.cpp.
|
friend |
Definition at line 100 of file qgstessellatedpolygongeometry.h.