EgtExecutor 2.1j4 :
- aggiunte funzioni Exe e Lua GetClEntMove, GetClEntFlag, GetClEntindex.
This commit is contained in:
@@ -2697,6 +2697,65 @@ LuaUpdateAllMachinings( lua_State* L)
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CL Entities Interrogations
|
||||
//-----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetClEntMove( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nEntId
|
||||
int nEntId ;
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero il tipo di movimento
|
||||
int nMove ;
|
||||
bool bOk = ExeGetClEntMove( nEntId, nMove) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, nMove) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetClEntFlag( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nEntId
|
||||
int nEntId ;
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero il flag
|
||||
int nFlag ;
|
||||
bool bOk = ExeGetClEntFlag( nEntId, nFlag) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, nFlag) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetClEntIndex( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nEntId
|
||||
int nEntId ;
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero l'indice
|
||||
int nIndex ;
|
||||
bool bOk = ExeGetClEntIndex( nEntId, nIndex) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, nIndex) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Simulation
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -3715,6 +3774,10 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachiningEndPoint", LuaGetMachiningEndPoint) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtApplyAllMachinings", LuaApplyAllMachinings) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtUpdateAllMachinings", LuaUpdateAllMachinings) ;
|
||||
// CL Entities Interrogations
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntMove", LuaGetClEntMove) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntFlag", LuaGetClEntFlag) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntIndex", LuaGetClEntIndex) ;
|
||||
// Simulation
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimInit", LuaSimInit) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimStart", LuaSimStart) ;
|
||||
|
||||
Reference in New Issue
Block a user