Skip to content

Commit a2da64a

Browse files
committedOct 7, 2017
Add information regarding polygon's normal calculation
1 parent 59ea61a commit a2da64a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/3d/qgstessellator.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ static void _makeWalls( const QgsCurve &ring, bool ccw, float extrusionHeight, Q
113113

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

0 commit comments

Comments
 (0)
Please sign in to comment.