16#ifndef QGSTESSELLATOR_H
17#define QGSTESSELLATOR_H
43 QgsTessellator(
double originX,
double originY,
bool addNormals,
bool invertNormals =
false,
bool addBackFaces =
false,
bool noZ =
false,
44 bool addTextureCoords =
false,
int facade = 3,
float textureRotation = 0.0f );
55 QgsTessellator(
const QgsRectangle &bounds,
bool addNormals,
bool invertNormals =
false,
bool addBackFaces =
false,
bool noZ =
false,
56 bool addTextureCoords =
false,
int facade = 3,
float textureRotation = 0.0f );
75 void addPolygon(
const QgsPolygon &polygon,
float extrusionHeight );
82 QVector<float>
data()
const {
return mData; }
85 int dataVerticesCount()
const;
88 int stride()
const {
return mStride; }
93 std::unique_ptr< QgsMultiPolygon > asMultiPolygon() const
SIP_SKIP;
99 float zMinimum()
const {
return mZMin; }
112 QString
error()
const {
return mError; }
118 double mOriginX = 0, mOriginY = 0;
119 bool mAddNormals =
false;
120 bool mInvertNormals =
false;
121 bool mAddBackFaces =
false;
122 bool mAddTextureCoords =
false;
123 bool mOutputZUp =
false;
124 QVector<float> mData;
127 int mTessellatedFacade = 3;
128 float mTextureRotation = 0.0f;
131 float mZMin = std::numeric_limits<float>::max();
132 float mZMax = -std::numeric_limits<float>::max();
Multi polygon geometry collection.
A rectangle specified with double values.
Class that takes care of tessellation of polygons into triangles.
QVector< float > data() const
Returns array of triangle vertex data.
int stride() const
Returns size of one vertex entry in bytes.
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...
float zMaximum() const
Returns maximal Z value of the data (in world coordinates)