Updates from review

This commit is contained in:
Martin Dobias 2018-05-07 16:21:17 -04:00
parent 875da3f56c
commit 3724138688
2 changed files with 13 additions and 6 deletions

View File

@ -46,9 +46,16 @@ class QgsTessellatedPolygonGeometry : public Qt3DRender::QGeometry
//! Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
void setInvertNormals( bool invert ) { mInvertNormals = invert; }
//! Returns whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
/**
* Returns whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
* \since QGIS 3.2
*/
bool addBackFaces() const { return mAddBackFaces; }
//! Sets whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
/**
* Sets whether also triangles facing the other side will be created. Useful if input data have inconsistent order of vertices
* \since QGIS 3.2
*/
void setAddBackFaces( bool add ) { mAddBackFaces = add; }
//! Initializes vertex buffer from given polygons. Takes ownership of passed polygon geometries

View File

@ -55,10 +55,10 @@ class _3D_EXPORT QgsTessellator
std::unique_ptr< QgsMultiPolygon > asMultiPolygon() const;
private:
double mOriginX, mOriginY;
bool mAddNormals;
bool mInvertNormals;
bool mAddBackFaces;
double mOriginX = 0, mOriginY = 0;
bool mAddNormals = false;
bool mInvertNormals = false;
bool mAddBackFaces = false;
QVector<float> mData;
int mStride;
};