From: divverent Date: Sun, 8 Mar 2009 20:47:40 +0000 (+0000) Subject: try indicating the direction of a cut X-Git-Tag: svn-r421~207 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=07e9ed4e6a5361df10f9dcdb6b9534440becd183;p=xonotic%2Fnetradiant.git try indicating the direction of a cut git-svn-id: svn://svn.icculus.org/netradiant/trunk@213 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/radiant/brush.h b/radiant/brush.h index 851a9836..319bcf22 100644 --- a/radiant/brush.h +++ b/radiant/brush.h @@ -3264,6 +3264,14 @@ public: else { Winding_DrawWireframe(m_winding); + + // also draw a line indicating the direction of the cut + Vector3 lineverts[2]; + Winding_Centroid(m_winding, m_plane, lineverts[0]); + lineverts[1] = vector3_added(lineverts[0], vector3_scaled(m_plane.normal(), g_MaxWorldCoord * 4)); + + glVertexPointer(3, GL_FLOAT, sizeof(Vector3), &lineverts[0]); + glDrawArrays(GL_LINES, 0, GLsizei(2)); } }