Skip to content

Commit

Permalink
Add information regarding polygon's normal calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
liberostelios committed Oct 7, 2017
1 parent 59ea61a commit a2da64a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/3d/qgstessellator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ static void _makeWalls( const QgsCurve &ring, bool ccw, float extrusionHeight, Q

static QVector3D _calculateNormal( const QgsCurve *curve )
{
// Calculate the polygon's normal vector, based on Newell's method
// https://www.khronos.org/opengl/wiki/Calculating_a_Surface_Normal
QgsVertexId::VertexType vt;
QgsPoint pt1, pt2;
QVector3D normal( 0, 0, 0 );
Expand Down

0 comments on commit a2da64a

Please sign in to comment.