Skip to content

Commit

Permalink
Updates from review
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 8, 2018
1 parent 875da3f commit 3724138
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 9 additions & 2 deletions src/3d/qgstessellatedpolygongeometry.h
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/3d/qgstessellator.h
Expand Up @@ -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;
};
Expand Down

0 comments on commit 3724138

Please sign in to comment.