From eda130dbc67f5793125f5517a041e5676b3b5c89 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 26 Jul 2015 13:35:05 +0200 Subject: [PATCH] 3D viewer: cosmetic enhancement: color of 3D axis is equal to the color of the corresponding icon in toolbar --- 3d-viewer/3d_draw_helper_functions.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/3d-viewer/3d_draw_helper_functions.cpp b/3d-viewer/3d_draw_helper_functions.cpp index e9f79d7f6e..43eb9629fd 100644 --- a/3d-viewer/3d_draw_helper_functions.cpp +++ b/3d-viewer/3d_draw_helper_functions.cpp @@ -189,16 +189,24 @@ void EDA_3D_CANVAS::draw3DAxis() glNewList( m_glLists[GL_ID_AXIS], GL_COMPILE ); glEnable( GL_COLOR_MATERIAL ); - SetGLColor( WHITE ); glBegin( GL_LINES ); + SetGLColor( RED ); glNormal3f( 0.0f, 0.0f, 1.0f ); // Normal is Z axis glVertex3f( 0.0f, 0.0f, 0.0f ); - glVertex3f( 1.0f, 0.0f, 0.0f ); // X axis + glVertex3f( -10.0f, 0.0f, 0.0f ); glVertex3f( 0.0f, 0.0f, 0.0f ); - glVertex3f( 0.0f, -1.0f, 0.0f ); // Y axis + glVertex3f( 10.0f, 0.0f, 0.0f ); // X axis + SetGLColor( BLUE ); + glVertex3f( 0.0f, 0.0f, 0.0f ); + glVertex3f( 0.0f, -10.0f, 0.0f ); // Y axis + glVertex3f( 0.0f, 0.0f, 0.0f ); + glVertex3f( 0.0f, 10.0f, 0.0f ); + SetGLColor( GREEN ); glNormal3f( 1.0f, 0.0f, 0.0f ); // Normal is Y axis glVertex3f( 0.0f, 0.0f, 0.0f ); - glVertex3f( 0.0f, 0.0f, 0.3f ); // Z axis + glVertex3f( 0.0f, 0.0f, -10.0f ); + glVertex3f( 0.0f, 0.0f, 0.0f ); + glVertex3f( 0.0f, 0.0f, 10.0f ); // Z axis glEnd(); glEndList();