EgtGraphics 1.5k4 :
- mark e selezione cambia colore anche back di superfici - miglioramento selezione entità - miglioramento selezione punti notevoli.
This commit is contained in:
+7
-2
@@ -290,19 +290,24 @@ ObjNewGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bShowAux)
|
||||
glLineWidth( 3) ;
|
||||
}
|
||||
|
||||
// colore speciale per superficie shading selezionata o marcata
|
||||
// colori speciali per superficie shading selezionata o marcata
|
||||
bool bStdCol = true ;
|
||||
float fSelMarkCol[4] = { 1, 1, 1, 1} ;
|
||||
float fSelMarkBackCol[4] = { 0.75, 0.75, 0.75, 1} ;
|
||||
if ( bSurfSha) {
|
||||
if ( nMark == GDB_MK_ON) {
|
||||
bStdCol = false ;
|
||||
Color colMark = ( ( GetScene() != nullptr) ? GetScene()->GetMark() : Color( 192, 192, 0)) ;
|
||||
colMark.GetFloat( fSelMarkCol) ;
|
||||
Color colMarkBack = GetSurfBackColor( colMark) ;
|
||||
colMarkBack.GetFloat( fSelMarkBackCol) ;
|
||||
}
|
||||
else if ( nStat == GDB_ST_SEL) {
|
||||
bStdCol = false ;
|
||||
Color colSelSurf = ( ( GetScene() != nullptr) ? GetScene()->GetSelSurf() : Color( 255, 255, 192)) ;
|
||||
colSelSurf.GetFloat( fSelMarkCol) ;
|
||||
Color colSelSurfBack = GetSurfBackColor( colSelSurf) ;
|
||||
colSelSurfBack.GetFloat( fSelMarkBackCol) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +345,7 @@ ObjNewGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bShowAux)
|
||||
glMaterialf( GL_FRONT, GL_SHININESS, iIter->m_fCol[0]) ;
|
||||
break ;
|
||||
case NgAtom::MAT_B :
|
||||
glMaterialfv( GL_BACK, GL_AMBIENT_AND_DIFFUSE, iIter->m_fCol) ;
|
||||
glMaterialfv( GL_BACK, GL_AMBIENT_AND_DIFFUSE, ( bStdCol ? iIter->m_fCol : fSelMarkBackCol)) ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user