]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
try indicating the direction of a cut
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 8 Mar 2009 20:47:40 +0000 (20:47 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 8 Mar 2009 20:47:40 +0000 (20:47 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@213 61c419a2-8eb2-4b30-bcec-8cead039b335

radiant/brush.h

index 851a9836524270ede2f6ce02c58a0251a38ac44b..319bcf2262acb0fc050ddac56e6ddf6393b0d974 100644 (file)
@@ -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));
     }
   }