Merge commit '49dac32893ce1a6c894eea9057049208579c1206' into Cube
This commit is contained in:
+25
-35
@@ -32,7 +32,6 @@ static const double MIN_EXTENSION = 250 ;
|
||||
static const double MIN_W_H = 0.01 ;
|
||||
static const double MIN_ZCLIP_EXT = 25000 ;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
IEGrScene*
|
||||
CreateEGrScene( void)
|
||||
@@ -63,6 +62,7 @@ Scene::Scene( void)
|
||||
m_cColCorner = Color( 200, 200, 200, 1) ;
|
||||
// Camera e viewport
|
||||
m_ptCenter = ORIG ;
|
||||
m_nOrizzOffsCamera = 0 ;
|
||||
SetCamera( 0, 0, 0) ;
|
||||
m_nViewportW = 0 ;
|
||||
m_nViewportH = 0 ;
|
||||
@@ -71,7 +71,7 @@ Scene::Scene( void)
|
||||
// Sfondo
|
||||
m_colBackTop.Set( 176, 176, 176) ;
|
||||
m_colBackBottom.Set( 176, 176, 176) ;
|
||||
// Modalità di visualizzazione
|
||||
// Modalit� di visualizzazione
|
||||
m_nShowMode = SM_WIREFRAME ;
|
||||
m_bShowCurveDirection = false ;
|
||||
m_bShowTriaAdvanced = true ;
|
||||
@@ -105,30 +105,20 @@ Scene::Scene( void)
|
||||
SetExtension( BBox3d( -MIN_EXTENSION, -MIN_EXTENSION, -MIN_EXTENSION,
|
||||
MIN_EXTENSION, MIN_EXTENSION, MIN_EXTENSION)) ;
|
||||
// Grid
|
||||
m_bShowGrid = false ;
|
||||
m_bShowFrame = false ;
|
||||
m_dSnapStep = 1 ;
|
||||
m_nMinLineSstep = 10 ;
|
||||
m_nMajLineSstep = 100 ;
|
||||
m_nExtSstep = 500 ;
|
||||
m_colMinLine.Set( 160, 160, 160) ;
|
||||
m_colMajLine.Set( 160, 160, 160) ;
|
||||
m_dGridWidth = 1000 ;
|
||||
m_dGridHeight = 1000 ;
|
||||
m_nGridFrame_Flag = 1 ;
|
||||
// Axis Frame
|
||||
m_bShowGlobFrame = true ;
|
||||
m_nAxisFrame_Flag = 3 ;
|
||||
m_dFrame_DistX = 40.0 ;
|
||||
m_dFrame_DistY = 120.0 ;
|
||||
m_dFrameLineL = 25.0;
|
||||
m_dFrameLineW = 2.0 ;
|
||||
// Global Cube
|
||||
m_bShowGlobCube = true ;
|
||||
m_nCube_Flag = 3 ;
|
||||
m_dCubeEdge = 80.0 ;
|
||||
m_dCubeX = 70.0 ;
|
||||
m_dCubeY = 70.0 ;
|
||||
m_bShowGrid = false ;
|
||||
m_bShowFrame = false ;
|
||||
m_dSnapStep = 10 ;
|
||||
m_nMinLineSstep = 1 ;
|
||||
m_nMajLineSstep = 10 ;
|
||||
m_nExtSstep = 100 ;
|
||||
m_dGridMinX = -INFINITO ;
|
||||
m_dGridMaxX = INFINITO ;
|
||||
m_dGridMinY = -INFINITO ;
|
||||
m_dGridMaxY = INFINITO ;
|
||||
m_colMinLine.Set( 160, 160, 160) ;
|
||||
m_colMajLine.Set( 160, 160, 160) ;
|
||||
// Global Frame
|
||||
m_bShowGlobFrame = false ;
|
||||
// Direct
|
||||
m_colorGL.Set( 255, 0, 0) ;
|
||||
m_bGeoLine = false ;
|
||||
@@ -156,7 +146,7 @@ Scene::Init( IGeomDB* pGeomDB)
|
||||
bool
|
||||
Scene::CreateContext( HDC hDC, int nDriver, bool b2Buff, int nColorBits, int nDepthBits)
|
||||
{
|
||||
// verifico validità Device Context
|
||||
// verifico validit� Device Context
|
||||
if ( hDC == nullptr)
|
||||
return false ;
|
||||
m_hDC = hDC ;
|
||||
@@ -233,7 +223,7 @@ Scene::CreateContext( HDC hDC, int nDriver, bool b2Buff, int nColorBits, int nDe
|
||||
LOG_INFO( GetEGrLogger(), "WGL_ARB_create_context missing !")
|
||||
}
|
||||
|
||||
// verifico validità Rendering Context
|
||||
// verifico validit� Rendering Context
|
||||
if ( m_hRC == nullptr)
|
||||
return false ;
|
||||
|
||||
@@ -244,7 +234,7 @@ Scene::CreateContext( HDC hDC, int nDriver, bool b2Buff, int nColorBits, int nDe
|
||||
if ( GlewInitResult != GLEW_OK)
|
||||
LOG_INFO( GetEGrLogger(), "GLEW is not initialized !")
|
||||
|
||||
// verifico se posso lavorare in modalità nuova
|
||||
// verifico se posso lavorare in modalit� nuova
|
||||
m_bNewWay = ( nDriver == OD_NEW && glewIsSupported( "GL_VERSION_3_0") == 1) ;
|
||||
if ( ! m_bNewWay)
|
||||
LOG_INFO( GetEGrLogger(), "OpenGL old way rendering !")
|
||||
@@ -306,11 +296,11 @@ Scene::ChooseGenPixelFormat( int nPfd, bool b2Buff, int nColorBits, int nDepthBi
|
||||
bool
|
||||
Scene::MakeCurrent( void) const
|
||||
{
|
||||
// se RC della scena non è definito, errore
|
||||
// se RC della scena non � definito, errore
|
||||
if ( m_hRC == nullptr)
|
||||
return false ;
|
||||
|
||||
// se RC della scena è quello corrente, ok
|
||||
// se RC della scena � quello corrente, ok
|
||||
HGLRC hRC = wglGetCurrentContext() ;
|
||||
if ( m_hRC == hRC)
|
||||
return true ;
|
||||
@@ -437,7 +427,7 @@ Scene::SetExtension( const BBox3d& b3Ext)
|
||||
bool
|
||||
Scene::CalcExtView( void)
|
||||
{
|
||||
// verifico se il calcolo è necessario
|
||||
// verifico se il calcolo � necessario
|
||||
if ( m_bExtViewOk && m_bUpOk)
|
||||
return true ;
|
||||
// calcolo direzione camera Up
|
||||
@@ -750,12 +740,12 @@ Scene::MyDraw( bool bSwapBF)
|
||||
if ( m_pGeomDB != nullptr)
|
||||
m_pGeomDB->GetDefaultMaterial( m_colDef) ;
|
||||
|
||||
// impostazioni dipendenti dalla modalità di visualizzazione
|
||||
// impostazioni dipendenti dalla modalit� di visualizzazione
|
||||
switch ( m_nShowMode) {
|
||||
case SM_WIREFRAME :
|
||||
// disabilito illuminazione
|
||||
glDisable( GL_LIGHTING) ;
|
||||
// disegno griglia senza illuminazione (già impostato)
|
||||
// disegno griglia senza illuminazione (gi� impostato)
|
||||
DrawGrid() ;
|
||||
// imposto dati standard per punti e linee
|
||||
glPointSize( (float) GetPointSize()) ;
|
||||
@@ -768,7 +758,7 @@ Scene::MyDraw( bool bSwapBF)
|
||||
case SM_HIDDENLINE :
|
||||
// disabilito illuminazione
|
||||
glDisable( GL_LIGHTING) ;
|
||||
// disegno griglia senza illuminazione (già impostato)
|
||||
// disegno griglia senza illuminazione (gi� impostato)
|
||||
DrawGrid() ;
|
||||
// imposto dati standard per punti e linee
|
||||
glPointSize( (float) GetPointSize()) ;
|
||||
|
||||
Reference in New Issue
Block a user