EgtExecutor 1.6v7 :
- introdotte prime funzioni Exe e Lua per solidi Zmap.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2016-2016
|
||||
//----------------------------------------------------------------------------
|
||||
// File : LUA_GdbCreateVol.cpp Data : 27.10.16 Versione : 1.6vt
|
||||
// Contenuto : Funzioni di creazione solidi per LUA.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 27.10.16 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "LUA.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EXeConst.h"
|
||||
#include "/EgtDev/Include/EGkLuaAux.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaCreateVolZmapBox( lua_State* L)
|
||||
{
|
||||
// 5 o 6 parametri : ParentId, PtIni, dDimX, dDimY, dDimZ, dPrec [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Point3d ptIni ;
|
||||
LuaCheckParam( L, 2, ptIni)
|
||||
double dDimX ;
|
||||
LuaCheckParam( L, 3, dDimX)
|
||||
double dDimY ;
|
||||
LuaCheckParam( L, 4, dDimY)
|
||||
double dDimZ ;
|
||||
LuaCheckParam( L, 5, dDimZ)
|
||||
double dPrec ;
|
||||
LuaCheckParam( L, 6, dPrec)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetParam( L, 7, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo VZM parallelepipedo
|
||||
int nId = ExeCreateVolZmap( nParentId, ptIni, dDimX, dDimY, dDimZ, dPrec, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetParam( L, nId) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
LuaInstallGdbCreateVol( LuaMgr& luaMgr)
|
||||
{
|
||||
bool bOk = ( &luaMgr != nullptr) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVolZmapBox", LuaCreateVolZmapBox) ;
|
||||
return bOk ;
|
||||
}
|
||||
Reference in New Issue
Block a user