Files
EgtExecutor/EXE_ShortestPath.cpp
T
DarioS e2b0a333da EgtExecutor 2.3h1 :
- la versione x64 compilata con clang-cl
- migliorie e correzioni suggerite dal nuovo compilatore.
2021-08-01 10:54:29 +02:00

113 lines
3.3 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2015-2015
//----------------------------------------------------------------------------
// File : EXE_ShortestPath.cpp Data : 23.12.15 Versione : 1.6l4
// Contenuto : Funzioni di calcolo Shortest Path per EXE.
//
//
//
// Modifiche : 23.12.15 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "EXE.h"
#include "EXE_Macro.h"
#include "LUA_Base.h"
#include "AuxTools.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/ENkShortestPath.h"
#include "/EgtDev/Include/EgtPointerOwner.h"
using namespace std ;
//----------------------------------------------------------------------------
// Static LuaMgr per EgtExecutor
//----------------------------------------------------------------------------
static PtrOwner< IShortestPath> s_pSP ;
//-----------------------------------------------------------------------------
bool
ExeSpInit( void)
{
// creo l'oggetto per il calcolo del percorso minimo (ShortestPath)
s_pSP.Set( CreateShortestPath()) ;
return ( ! IsNull( s_pSP)) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpTerminate( void)
{
// distruggo l'oggetto
s_pSP.Reset() ;
return ( IsNull( s_pSP)) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpAddPoint( double dXi, double dYi, double dZi, double dHi, double dVi,
double dXf, double dYf, double dZf, double dHf, double dVf)
{
if ( IsNull( s_pSP))
return false ;
return s_pSP->AddPoint( dXi, dYi, dZi, dHi, dVi, dXf, dYf, dZf, dHf, dVf) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpSetOpenBound( bool bStartVsEnd, int nFlag,
double dX, double dY, double dZ, double dH, double dV)
{
if ( IsNull( s_pSP))
return false ;
return s_pSP->SetOpenBound( bStartVsEnd, nFlag, dX, dY, dZ, dH, dV) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpSetAngularParams( double dAngHAdd, double dAngHMul, double dAngVAdd, double dAngVMul)
{
if ( IsNull( s_pSP))
return false ;
return s_pSP->SetAngularParams( dAngHAdd, dAngHMul, dAngVAdd, dAngVMul) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpSetZzOwStep( double dStep)
{
if ( IsNull( s_pSP))
return false ;
return s_pSP->SetZzOwStep( dStep) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpCalculate( int nType)
{
if ( IsNull( s_pSP))
return false ;
return s_pSP->Calculate( nType) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpGetOrder( INTVECTOR& vOrder)
{
if ( IsNull( s_pSP))
return false ;
return s_pSP->GetOrder( vOrder) ;
}
//-----------------------------------------------------------------------------
bool
ExeSpGetMinLength( double& dMinLen)
{
if ( IsNull( s_pSP))
return false ;
return s_pSP->GetMinLength( dMinLen) ;
}