EgtGraphics 1.9l4 :
- fabs sostituito da abs - aggiunto disegno asse Z+ in riferimento griglia.
This commit is contained in:
+5
-1
@@ -33,7 +33,7 @@ bool
|
||||
Scene::SetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep)
|
||||
{
|
||||
const double MIN_SNAP_STEP = 0.1 ;
|
||||
m_dSnapStep = std::max( fabs( dSnapStep), MIN_SNAP_STEP) ;
|
||||
m_dSnapStep = max( abs( dSnapStep), MIN_SNAP_STEP) ;
|
||||
m_nMinLineSstep = abs( nMinLineSstep) ;
|
||||
m_nMajLineSstep = abs( nMajLineSstep) ;
|
||||
m_nExtSstep = abs( nExtSstep) ;
|
||||
@@ -127,6 +127,10 @@ Scene::DrawGrid( void)
|
||||
glColor3f( LIME.GetRed(), LIME.GetGreen(), LIME.GetBlue()) ;
|
||||
glVertex3f( 0, 0, Z_DOWN) ;
|
||||
glVertex3f( 0, dExt, Z_DOWN) ;
|
||||
// asse Z+
|
||||
glColor3f( BLUE.GetRed(), BLUE.GetGreen(), BLUE.GetBlue()) ;
|
||||
glVertex3f( 0, 0, Z_DOWN) ;
|
||||
glVertex3f( 0, 0, float( m_nMajLineSstep * m_dSnapStep)) ;
|
||||
// se richiesta griglia, assi X- e Y-
|
||||
if ( m_bShowGrid) {
|
||||
glColor3f( m_colMajLine.GetRed(), m_colMajLine.GetGreen(), m_colMajLine.GetBlue()) ;
|
||||
|
||||
Reference in New Issue
Block a user