← Back to team overview

kicad-developers team mailing list archive

3D-Viewer: colored and longer axes.

 

At this moment with enabled 3d axes are complicated to define position in 3d space. I propose to use more longer and colored axes. Color of the axis is equal to the color of the icon of the toolbar button.

Regards, Konstantin.
=== modified file '3d-viewer/3d_draw_helper_functions.cpp'
--- 3d-viewer/3d_draw_helper_functions.cpp	2015-07-14 20:23:13 +0000
+++ 3d-viewer/3d_draw_helper_functions.cpp	2015-07-26 09:51:01 +0000
@@ -189,16 +189,24 @@
         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( 0.0f, 0.0f, 0.0f );
-        glVertex3f( 0.0f, -1.0f, 0.0f );    // Y axis
+        glVertex3f( -10.0f, 0.0f, 0.0f );
+        glVertex3f( 0.0f, 0.0f, 0.0f );
+        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();

Attachment: 3D_view_example.png
Description: PNG image


Follow ups