QGIS API Documentation
3.4.15-Madeira (e83d02e274)
|
3 Class derived from Qt3DRender::QGeometry that represents polygons tessellated into 3D geometry. More...
#include <qgstessellatedpolygongeometry.h>
Public Member Functions | |
QgsTessellatedPolygonGeometry (QNode *parent=nullptr) | |
Constructor. More... | |
bool | addBackFaces () const |
Returns whether also triangles facing the other side will be created. More... | |
bool | invertNormals () const |
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders) More... | |
void | setAddBackFaces (bool add) |
Sets whether also triangles facing the other side will be created. More... | |
void | setInvertNormals (bool invert) |
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders) More... | |
void | setPolygons (const QList< QgsPolygon * > &polygons, const QList< QgsFeatureId > &featureIds, const QgsPointXY &origin, float extrusionHeight, const QList< float > &extrusionHeightPerPolygon=QList< float >()) |
Initializes vertex buffer from given polygons. Takes ownership of passed polygon geometries. More... | |
QgsFeatureId | triangleIndexToFeatureId (uint triangleIndex) const |
Returns ID of the feature to which given triangle index belongs (used for picking) More... | |
3 Class derived from Qt3DRender::QGeometry 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 38 of file qgstessellatedpolygongeometry.h.
QgsTessellatedPolygonGeometry::QgsTessellatedPolygonGeometry | ( | QNode * | parent = nullptr | ) |
Constructor.
Definition at line 28 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 54 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 46 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 60 of file qgstessellatedpolygongeometry.h.
|
inline |
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
Definition at line 48 of file qgstessellatedpolygongeometry.h.
void QgsTessellatedPolygonGeometry::setPolygons | ( | const QList< QgsPolygon * > & | polygons, |
const QList< QgsFeatureId > & | featureIds, | ||
const QgsPointXY & | origin, | ||
float | extrusionHeight, | ||
const QList< float > & | extrusionHeightPerPolygon = QList<float>() |
||
) |
Initializes vertex buffer from given polygons. Takes ownership of passed polygon geometries.
Definition at line 59 of file qgstessellatedpolygongeometry.cpp.
QgsFeatureId QgsTessellatedPolygonGeometry::triangleIndexToFeatureId | ( | uint | triangleIndex | ) | const |
Returns ID of the feature to which given triangle index belongs (used for picking)
Definition at line 117 of file qgstessellatedpolygongeometry.cpp.