X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fbrush.h;h=38ee475d8110b1ef74d9a5f38524c3b5b198d8b8;hb=857830098fde02315c7af7f4bc2d2f018eb67407;hp=851a9836524270ede2f6ce02c58a0251a38ac44b;hpb=107765f0e4b543dfc346851ee5b4605cc17eb1c6;p=xonotic%2Fnetradiant.git diff --git a/radiant/brush.h b/radiant/brush.h index 851a9836..38ee475d 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(), Brush::m_maxWorldCoord * 4)); + + glVertexPointer(3, GL_FLOAT, sizeof(Vector3), &lineverts[0]); + glDrawArrays(GL_LINES, 0, GLsizei(2)); } }