EgtInterface 1.5i5 :
- aggiunto interprete Lua - portate in interfaccia API molte funzioni di base.
This commit is contained in:
+39
-13
@@ -64,7 +64,7 @@ __stdcall EgtSetBackground( int nGseCtx, int nTopRed, int nTopGreen, int nTopBlu
|
||||
pGseCtx->m_pScene->SetBackground( Color( nTopRed, nTopGreen, nTopBlue),
|
||||
Color( nBottomRed, nBottomGreen, nBottomBlue)) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ __stdcall EgtSetShowMode( int nGseCtx, int nShowMode, BOOL bRedraw)
|
||||
if ( nShowMode >= SM_WIREFRAME && nShowMode <= SM_SHADING) {
|
||||
pGseCtx->m_pScene->SetShowMode( nShowMode) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
else
|
||||
@@ -119,7 +119,7 @@ __stdcall EgtSetShowCurveDirection( int nGseCtx, int nShow, BOOL bRedraw)
|
||||
// imposto stato
|
||||
pGseCtx->m_pScene->SetShowCurveDirection( nShow != 0) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -137,19 +137,19 @@ __stdcall EgtZoom( int nGseCtx, int nZoom, BOOL bRedraw)
|
||||
case 1 :
|
||||
pGseCtx->m_pScene->ZoomAll() ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
break ;
|
||||
case 2 :
|
||||
pGseCtx->m_pScene->ZoomChange( COEFF_IN) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
break ;
|
||||
case 3 :
|
||||
pGseCtx->m_pScene->ZoomChange( COEFF_OUT) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
break ;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ __stdcall EgtZoomOnPoint( int nGseCtx, int nWinX, int nWinY, double dCoeff, BOOL
|
||||
// eseguo zoom
|
||||
pGseCtx->m_pScene->ZoomOnPoint( Point3d( nWinX, nWinY), dCoeff) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ __stdcall EgtSetWinRect( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nC
|
||||
// disegno finestra per zoom
|
||||
pGseCtx->m_pScene->SetWinRect( Point3d( nPrevX, nPrevY), Point3d( nCurrX, nCurrY)) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ __stdcall EgtResetWinRect( int nGseCtx, BOOL bRedraw)
|
||||
// cancello finestra per zoom
|
||||
pGseCtx->m_pScene->ResetWinRect() ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ __stdcall EgtZoomWin( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nCurr
|
||||
// eseguo zoom su finestra
|
||||
pGseCtx->m_pScene->ZoomWin( Point3d( nPrevX, nPrevY), Point3d( nCurrX, nCurrY)) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -219,13 +219,39 @@ __stdcall EgtSetView( int nGseCtx, int nView, BOOL bRedraw)
|
||||
if ( nView >= CT_TOP && nView <= CT_ISO_NW) {
|
||||
pGseCtx->m_pScene->SetCamera( nView) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
else
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetGenericView( int nGseCtx, double dAngVertDeg, double dAngHorizDeg, BOOL bRedraw)
|
||||
{
|
||||
GseContext* pGseCtx = GetGseContext( nGseCtx) ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, FALSE)
|
||||
// imposto vista
|
||||
pGseCtx->m_pScene->SetCamera( dAngVertDeg, dAngHorizDeg, 0) ;
|
||||
if ( bRedraw)
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetViewCenter( int nGseCtx, double ptP[3], BOOL bRedraw)
|
||||
{
|
||||
GseContext* pGseCtx = GetGseContext( nGseCtx) ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, FALSE)
|
||||
// imposto vista
|
||||
pGseCtx->m_pScene->SetCenter( Point3d( ptP[0], ptP[1], ptP[2])) ;
|
||||
if ( bRedraw)
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtPanCamera( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw)
|
||||
@@ -235,7 +261,7 @@ __stdcall EgtPanCamera( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nCu
|
||||
// eseguo panoramica
|
||||
pGseCtx->m_pScene->PanCamera( Point3d( nPrevX, nPrevY), Point3d( nCurrX, nCurrY)) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -248,7 +274,7 @@ __stdcall EgtRotateCamera( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int
|
||||
// eseguo rotazione camera
|
||||
pGseCtx->m_pScene->RotateCamera( Point3d( nPrevX, nPrevY), Point3d( nCurrX, nCurrY)) ;
|
||||
if ( bRedraw)
|
||||
RedrawWindow( pGseCtx->m_hWnd, nullptr, nullptr, RDW_INVALIDATE) ;
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user