EgtInterface 1.6b3 :
- aggiunta gestione messaggi da file per le diverse lingue - aggiunta gestione visualizzazione avanzata di triangoli si SurfTM - aggiunta creazione poligoni regolari da raggio e da apotema - cambiato nome di alcune funzioni di scena per gestire punto di vista.
This commit is contained in:
@@ -1558,6 +1558,90 @@ __stdcall EgtCreateRectangle3P( int nParentId, const double ptIni[3],
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreatePolygonFromRadius( int nParentId, int nNumSides, const double ptCen[3],
|
||||
const double ptCorn[3], const double vtN[3], int nRefType)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
bool bOk = true ;
|
||||
// recupero il riferimento locale
|
||||
Frame3d frLoc ;
|
||||
if ( ! pGeomDB->GetGroupGlobFrame( nParentId, frLoc))
|
||||
return GDB_ID_NULL ;
|
||||
// porto in locale i punti, la normale e il versore estrusione
|
||||
Point3d ptCenL = GetPointLocal( pGeomDB, ptCen, nRefType, frLoc) ;
|
||||
Point3d ptCornL = GetPointLocal( pGeomDB, ptCorn, nRefType, frLoc) ;
|
||||
Vector3d vtNL = GetVectorLocal( pGeomDB, vtN, nRefType, frLoc) ;
|
||||
Vector3d vtExtrL = GetVectorLocal( pGeomDB, Z_AX.v, nRefType, frLoc) ;
|
||||
// creo la curva composita
|
||||
PtrOwner<ICurveComposite> pCrvCompo( CreateCurveComposite()) ;
|
||||
bOk = bOk && ! IsNull( pCrvCompo) ;
|
||||
// setto la curva
|
||||
bOk = bOk && pCrvCompo->PolygonCenterCorner( nNumSides, ptCenL, ptCornL, vtNL) ;
|
||||
// assegno il versore estrusione
|
||||
bOk = bOk && pCrvCompo->SetExtrusion( vtExtrL) ;
|
||||
// inserisco la curva nel DB
|
||||
int nId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pCrvCompo)) : GDB_ID_NULL) ;
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtPolygonFromRadius(" + ToString( nParentId) + "," +
|
||||
ToString( nNumSides) + ",{" +
|
||||
ToString( Point3d( ptCen)) + "},{" +
|
||||
ToString( Point3d( ptCorn)) + "},{" +
|
||||
ToString( Vector3d( vtN)) + "}," +
|
||||
RefTypeToString( nRefType) + ")" +
|
||||
" -- Id=" + ToString( nId) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco l'identificativo della nuova entità
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreatePolygonFromApothem( int nParentId, int nNumSides, const double ptCen[3],
|
||||
const double ptMid[3], const double vtN[3], int nRefType)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
bool bOk = true ;
|
||||
// recupero il riferimento locale
|
||||
Frame3d frLoc ;
|
||||
if ( ! pGeomDB->GetGroupGlobFrame( nParentId, frLoc))
|
||||
return GDB_ID_NULL ;
|
||||
// porto in locale i punti, la normale e il versore estrusione
|
||||
Point3d ptCenL = GetPointLocal( pGeomDB, ptCen, nRefType, frLoc) ;
|
||||
Point3d ptMidL = GetPointLocal( pGeomDB, ptMid, nRefType, frLoc) ;
|
||||
Vector3d vtNL = GetVectorLocal( pGeomDB, vtN, nRefType, frLoc) ;
|
||||
Vector3d vtExtrL = GetVectorLocal( pGeomDB, Z_AX.v, nRefType, frLoc) ;
|
||||
// creo la curva composita
|
||||
PtrOwner<ICurveComposite> pCrvCompo( CreateCurveComposite()) ;
|
||||
bOk = bOk && ! IsNull( pCrvCompo) ;
|
||||
// setto la curva
|
||||
bOk = bOk && pCrvCompo->PolygonCenterMidSide( nNumSides, ptCenL, ptMidL, vtNL) ;
|
||||
// assegno il versore estrusione
|
||||
bOk = bOk && pCrvCompo->SetExtrusion( vtExtrL) ;
|
||||
// inserisco la curva nel DB
|
||||
int nId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pCrvCompo)) : GDB_ID_NULL) ;
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtPolygonFromApothem(" + ToString( nParentId) + "," +
|
||||
ToString( nNumSides) + ",{" +
|
||||
ToString( Point3d( ptCen)) + "},{" +
|
||||
ToString( Point3d( ptMid)) + "},{" +
|
||||
ToString( Vector3d( vtN)) + "}," +
|
||||
RefTypeToString( nRefType) + ")" +
|
||||
" -- Id=" + ToString( nId) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco l'identificativo della nuova entità
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreatePolygonFromSide( int nParentId, int nNumSides, const double ptIni[3],
|
||||
|
||||
+6
-1
@@ -30,7 +30,6 @@
|
||||
|
||||
using namespace std ;
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtChangeGroupFrame( int nId, double ptOrig[3],
|
||||
@@ -67,6 +66,7 @@ EgtChangeGroupFrame( int nId, const Frame3d& frNewRef, int nRefType)
|
||||
// aggiorno il gruppo
|
||||
if ( bOk)
|
||||
*pFrame = frNewL ;
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtChangeGroupFrame(" + ToString( nId) + ",{" +
|
||||
@@ -99,6 +99,7 @@ __stdcall EgtChangeVectorBase( int nId, const double ptB[3], int nRefType)
|
||||
Point3d ptBL = GetPointLocal( pGeomDB, ptB, nRefType, frLoc) ;
|
||||
// imposto il nuovo punto di base
|
||||
bOk = bOk && pGVect->ChangeBase( ptBL) ;
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtChangeVectorBase(" + ToString( nId) + ",{" +
|
||||
@@ -137,6 +138,7 @@ __stdcall EgtInvertSurface( int nId)
|
||||
nI = pGeomDB->GetNextSelectedObj() ;
|
||||
}
|
||||
}
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtInvertSurf(" + ( nId != GDB_ID_SEL ? ToString( nId) : "GDB_ID_SEL") + ")" +
|
||||
@@ -194,6 +196,7 @@ EgtSurfTmDoSewing( const INTVECTOR& vIds, bool bErase)
|
||||
for ( size_t i = 1 ; i < vIds.size() ; ++ i)
|
||||
pGeomDB->Erase( vIds[i]) ;
|
||||
}
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sIds ;
|
||||
@@ -308,6 +311,7 @@ __stdcall EgtExplodeText( int nId)
|
||||
}
|
||||
// elimino il testo originale
|
||||
bOk = bOk && pGeomDB->Erase( nId) ;
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtExplodeText(" + ToString( nId) + ")" +
|
||||
@@ -349,6 +353,7 @@ __stdcall EgtSplitText( int nId)
|
||||
}
|
||||
// elimino il testo originale
|
||||
bOk = bOk && pGeomDB->Erase( nId) ;
|
||||
EgtSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtSplitText(" + ToString( nId) + ")" +
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
//----------------------------------------------------------------------------
|
||||
// File : API_Messages.cpp Data : 12.02.15 Versione : 1.6b3
|
||||
// Contenuto : Funzioni per gestione messaggi.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 12.02.15 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "API.h"
|
||||
#include "/EgtDev/Include/EInAPI.h"
|
||||
#include "/EgtDEv/Include/EGnScan.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtLogger.h"
|
||||
#include <unordered_map>
|
||||
|
||||
using namespace std ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
typedef unordered_map< int, string> INTSTR_UMAP ;
|
||||
INTSTR_UMAP s_IdStringMap ;
|
||||
wstring s_wsMsg ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtLoadMessages( const wchar_t* wsMsgFilePath)
|
||||
{
|
||||
// inizializzo lo scanner
|
||||
string sMsgFilePath = wstrztoA( wsMsgFilePath) ;
|
||||
Scanner scan ;
|
||||
if ( ! scan.Init( sMsgFilePath))
|
||||
return FALSE ;
|
||||
|
||||
// riservo spazio
|
||||
s_IdStringMap.rehash( 1000) ;
|
||||
s_wsMsg.reserve( 128) ;
|
||||
// leggo le linee
|
||||
string sLine ;
|
||||
sLine.reserve( 128) ;
|
||||
string sNum ;
|
||||
sNum.reserve( 16) ;
|
||||
string sMsg ;
|
||||
sMsg.reserve( 128) ;
|
||||
int nNum ;
|
||||
int nCurrNum = - 1 ;
|
||||
while ( scan.GetLine( sLine)) {
|
||||
// divido la linea in due parti sul token '='
|
||||
Split( sLine, "=", true, sNum, sMsg) ;
|
||||
// la prima parte deve essere numerica
|
||||
if ( sNum.empty() || ! FromString( sNum, nNum)) {
|
||||
string sOut ;
|
||||
sOut = "Problem in " + sMsgFilePath + " at line " + ToString( scan.GetCurrLineNbr()) + " : " + sLine ;
|
||||
LOG_WARN( GetLogger(), sOut.c_str())
|
||||
continue ;
|
||||
}
|
||||
// la numerazione deve essere crescente
|
||||
if ( nNum <= nCurrNum) {
|
||||
string sOut ;
|
||||
sOut = "Error in " + sMsgFilePath + " at message " + sNum + " : " + sLine ;
|
||||
LOG_ERROR( GetLogger(), sOut.c_str())
|
||||
return FALSE ;
|
||||
}
|
||||
nCurrNum = nNum ;
|
||||
// converto i caratteri speciali
|
||||
ReplaceString( sMsg, "<br/>", "\n") ;
|
||||
// inserisco il messaggio in tabella
|
||||
if ( ! s_IdStringMap.emplace( nNum, sMsg).second)
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// termino lo scanner
|
||||
return ( scan.Terminate() ? TRUE :FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const wchar_t*
|
||||
__stdcall EgtGetMsg( int nMsg)
|
||||
{
|
||||
// recupero il messaggio
|
||||
INTSTR_UMAP::iterator Iter = s_IdStringMap.find( nMsg) ;
|
||||
if ( Iter != s_IdStringMap.end())
|
||||
s_wsMsg = stringtoW( Iter->second) ;
|
||||
else
|
||||
s_wsMsg = stringtoW( ( "Msg" + ToString( nMsg))) ;
|
||||
return s_wsMsg.c_str() ;
|
||||
}
|
||||
+42
-6
@@ -423,6 +423,29 @@ __stdcall EgtGetShowCurveDirection( void)
|
||||
return pGseCtx->m_pScene->GetShowCurveDirection() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetShowTriaAdv( BOOL bAdvanced, BOOL bRedraw)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, FALSE)
|
||||
// imposto stato
|
||||
pGseCtx->m_pScene->SetShowTriaAdvanced( bAdvanced != FALSE) ;
|
||||
if ( bRedraw)
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetShowTriaAdv( void)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, FALSE)
|
||||
// recupero lo stato
|
||||
return pGseCtx->m_pScene->GetShowTriaAdvanced() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtZoom( int nZoom, BOOL bRedraw)
|
||||
@@ -563,13 +586,13 @@ __stdcall EgtZoomWin( int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedr
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetView( int nView, BOOL bRedraw)
|
||||
__stdcall EgtSetView( int nDir, BOOL bRedraw)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, FALSE)
|
||||
// imposto vista
|
||||
if ( nView >= CT_TOP && nView <= CT_CPLANE) {
|
||||
pGseCtx->m_pScene->SetCamera( nView) ;
|
||||
if ( nDir >= CT_TOP && nDir <= CT_CPLANE) {
|
||||
pGseCtx->m_pScene->SetCamera( nDir) ;
|
||||
if ( bRedraw)
|
||||
pGseCtx->m_pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
@@ -606,7 +629,7 @@ __stdcall EgtSetViewCenter( const double ptP[3], BOOL bRedraw)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtPanCamera( int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw)
|
||||
__stdcall EgtPanView( int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, FALSE)
|
||||
@@ -619,7 +642,7 @@ __stdcall EgtPanCamera( int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRe
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRotateCamera( int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw)
|
||||
__stdcall EgtRotateView( int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_SCENE( pGseCtx, FALSE)
|
||||
@@ -632,7 +655,7 @@ __stdcall EgtRotateCamera( int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCameraDir( int* pnDir)
|
||||
__stdcall EgtGetView( int* pnDir)
|
||||
{
|
||||
IEGrScene* pScene = GetCurrScene() ;
|
||||
VERIFY_SCENE( pScene, FALSE)
|
||||
@@ -643,6 +666,19 @@ __stdcall EgtGetCameraDir( int* pnDir)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetGenericView( double* pdAngVertDeg, double* pdAngHorizDeg)
|
||||
{
|
||||
IEGrScene* pScene = GetCurrScene() ;
|
||||
VERIFY_SCENE( pScene, FALSE)
|
||||
// recupero direzione di vista
|
||||
if ( pdAngVertDeg == nullptr || pdAngHorizDeg == nullptr)
|
||||
return FALSE ;
|
||||
pScene->GetCamera( pdAngVertDeg, pdAngHorizDeg) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtProjectPoint( const double ptP[3], double ptWin[3])
|
||||
|
||||
Binary file not shown.
@@ -234,6 +234,7 @@ copy $(TargetPath) \EgtProg\Dll64</Command>
|
||||
<ClCompile Include="API_GeoSnap.cpp" />
|
||||
<ClCompile Include="API_GeoTransform.cpp" />
|
||||
<ClCompile Include="API_Lua.cpp" />
|
||||
<ClCompile Include="API_Messages.cpp" />
|
||||
<ClCompile Include="API_Scene.cpp" />
|
||||
<ClCompile Include="API_TscExec.cpp" />
|
||||
<ClCompile Include="AuxTools.cpp" />
|
||||
|
||||
@@ -188,6 +188,9 @@
|
||||
<ClCompile Include="GeoTools.cpp">
|
||||
<Filter>File di origine\Global</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="API_Messages.cpp">
|
||||
<Filter>File di origine\API</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="EgtInterface.rc">
|
||||
|
||||
@@ -557,6 +557,62 @@ LuaCreateRectangle3P( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreatePolygonFromRadius( lua_State* L)
|
||||
{
|
||||
// 5 o 6 parametri : ParentId, nNumSides, PtCen, PtCorn, VtN [, sRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nNumSides ;
|
||||
LuaCheckParam( L, 2, nNumSides)
|
||||
Point3d PtCen ;
|
||||
LuaCheckParam( L, 3, PtCen)
|
||||
Point3d PtCorn ;
|
||||
LuaCheckParam( L, 4, PtCorn)
|
||||
Vector3d vtN ;
|
||||
LuaCheckParam( L, 5, vtN)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetRefType( L, 6, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il poligono
|
||||
int nId = EgtCreatePolygonFromRadius( nParentId, nNumSides, PtCen.v, PtCorn.v, vtN.v, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetReturn( L, nId) ;
|
||||
else
|
||||
LuaSetReturn( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreatePolygonFromApothem( lua_State* L)
|
||||
{
|
||||
// 5 o 6 parametri : ParentId, nNumSides, PtCen, PtMid, VtN [, sRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nNumSides ;
|
||||
LuaCheckParam( L, 2, nNumSides)
|
||||
Point3d PtCen ;
|
||||
LuaCheckParam( L, 3, PtCen)
|
||||
Point3d PtMid ;
|
||||
LuaCheckParam( L, 4, PtMid)
|
||||
Vector3d vtN ;
|
||||
LuaCheckParam( L, 5, vtN)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetRefType( L, 6, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il poligono
|
||||
int nId = EgtCreatePolygonFromApothem( nParentId, nNumSides, PtCen.v, PtMid.v, vtN.v, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetReturn( L, nId) ;
|
||||
else
|
||||
LuaSetReturn( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreatePolygonFromSide( lua_State* L)
|
||||
@@ -610,6 +666,8 @@ LuaInstallGdbCreateCurve( lua_State* L)
|
||||
lua_register( L, "EgtCurveCompoFromPointBulges", LuaCreateCurveCompoFromPointBulges) ;
|
||||
lua_register( L, "EgtCurveCompoByApprox", LuaCreateCurveCompoByApprox) ;
|
||||
lua_register( L, "EgtRectangle3P", LuaCreateRectangle3P) ;
|
||||
lua_register( L, "EgtPolygonFromRadius", LuaCreatePolygonFromRadius) ;
|
||||
lua_register( L, "EgtPolygonFromApothem", LuaCreatePolygonFromApothem) ;
|
||||
lua_register( L, "EgtPolygonFromSide", LuaCreatePolygonFromSide) ;
|
||||
}
|
||||
catch ( ...) {
|
||||
|
||||
@@ -97,6 +97,24 @@ LuaSetShowCurveDirection( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaSetShowTriaAdv( lua_State* L)
|
||||
{
|
||||
// 1 o 2 parametri : flag bAdvanced [, flag ridisegna]
|
||||
bool bAdvanced ;
|
||||
LuaCheckParam( L, 1, bAdvanced)
|
||||
bool bRedraw = true ;
|
||||
if ( lua_gettop( L) >= 2)
|
||||
LuaCheckParam( L, 2, bRedraw)
|
||||
LuaClearStack( L) ;
|
||||
// imposto visualizzazione direzione curve
|
||||
bool bOk = ( EgtSetShowTriaAdv( bAdvanced, bRedraw) != FALSE) ;
|
||||
// restituisco il risultato
|
||||
LuaSetReturn( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaZoom( lua_State* L)
|
||||
@@ -206,6 +224,7 @@ LuaInstallScene( lua_State* L)
|
||||
lua_register( L, "EgtDraw", LuaDraw) ;
|
||||
lua_register( L, "EgtSetShowMode", LuaSetShowMode) ;
|
||||
lua_register( L, "EgtSetShowCurveDirection", LuaSetShowCurveDirection) ;
|
||||
lua_register( L, "EgtSetShowTriaAdv", LuaSetShowTriaAdv) ;
|
||||
lua_register( L, "EgtZoom", LuaZoom) ;
|
||||
lua_register( L, "EgtSetView", LuaSetView) ;
|
||||
lua_register( L, "EgtSetGenericView", LuaSetGenericView) ;
|
||||
|
||||
Reference in New Issue
Block a user