16#ifndef QGSTESSELLATOR_H
17#define QGSTESSELLATOR_H
48 Q_DECL_DEPRECATED
QgsTessellator(
double originX,
double originY,
bool addNormals,
bool invertNormals =
false,
bool addBackFaces =
false,
bool noZ =
false,
61 Q_DECL_DEPRECATED
QgsTessellator( const
QgsRectangle &bounds,
bool addNormals,
bool invertNormals = false,
bool addBackFaces = false,
bool noZ = false,
87 void setInputZValueIgnored(
bool ignore );
111 void setTextureRotation(
float rotation );
123 void setAddTextureUVs(
bool addTextureUVs );
135 void setAddNormals(
bool addNormals );
147 void setBackFacesEnabled(
bool addBackFaces );
159 void setInvertNormals(
bool invertNormals );
184 void addPolygon(
const QgsPolygon &polygon,
float extrusionHeight );
191 QVector<float>
data()
const {
return mData; }
194 int dataVerticesCount()
const;
202 std::unique_ptr< QgsMultiPolygon > asMultiPolygon() const
SIP_SKIP;
221 QString
error()
const {
return mError; }
226 void setExtrusionFacesLegacy(
int facade );
227 void calculateBaseTransform(
const QVector3D &pNormal, QMatrix4x4 *base )
const;
228 void addTriangleVertices(
const std::array<QVector3D, 3> &points, QVector3D pNormal,
float extrusionHeight, QMatrix4x4 *transformMatrix,
const QgsPoint *originOffset,
bool reverse );
229 std::vector<QVector3D> generateConstrainedDelaunayTriangles(
const QgsPolygon *polygonNew );
232 bool mAddNormals =
false;
233 bool mInvertNormals =
false;
234 bool mAddBackFaces =
false;
235 bool mAddTextureCoords =
false;
236 bool mOutputZUp =
false;
237 QVector<float> mData;
238 int mStride = 3 *
sizeof( float );
239 bool mInputZValueIgnored =
false;
241 float mTextureRotation = 0.0f;
245 float mZMin = std::numeric_limits<float>::max();
246 float mZMax = -std::numeric_limits<float>::max();
QFlags< ExtrusionFace > ExtrusionFaces
Tessellator extrusion face types.
Multi polygon geometry collection.
Point geometry type, with support for z-dimension and m-values.
A rectangle specified with double values.
float textureRotation() const
Returns the rotation of texture UV coordinates (in degrees).
bool hasTextureUVs() const
Returns whether texture UV coordinates are being added to the output data (true) or not (false).
void setOrigin(const QgsVector3D &origin)
Sets the origin point of the map.
QVector< float > data() const
Returns array of triangle vertex data.
bool isZValueIgnored() const
Returns whether Z values from the input geometries are ignored (true) or not (false).
int stride() const
Returns size of one vertex entry in bytes.
bool hasBackFacesEnabled() const
Returns whether back faces are being added to the output data (true) or not (false).
float zMinimum() const
Returns minimal Z value of the data (in world coordinates).
Qgis::ExtrusionFaces extrusionFaces() const
Returns which faces are generated during extrusion.
QgsVector3D origin() const
Returns the origin point of the map.
QString error() const
Returns a descriptive error string if the tessellation failed.
void setOutputZUp(bool zUp)
Sets whether the "up" direction should be the Z axis on output (true), otherwise the "up" direction w...
bool isOutputZUp() const
Returns whether the "up" direction should be the Z axis on output (true), otherwise the "up" directio...
bool hasNormals() const
Returns whether normals are being added to the output data (true) or not (false).
bool hasInvertedNormals() const
Returns whether normals are inverted (true) or not (false).
float zMaximum() const
Returns maximal Z value of the data (in world coordinates).
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...