Files
EgtInterface/API_Photo.cpp
T
Dario Sassi c9738c189b EgtInterface 1.6n7 :
- aggiornamento per nuove funzioni con Photo.
2016-02-18 18:46:27 +00:00

87 lines
2.7 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2015-2015
//----------------------------------------------------------------------------
// File : API_Photo.cpp Data : 05.10.15 Versione : 1.6j1
// Contenuto : Funzioni gestione fotografie per API.
//
//
//
// Modifiche : 05.10.15 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "API.h"
#include "/EgtDev/Include/EInAPI.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/EgtStringConverter.h"
using namespace std ;
//-----------------------------------------------------------------------------
int
__stdcall EgtAddPhoto( const wchar_t* wsName, const wchar_t* wsFile,
const double ptOri[3], const double ptCen[3], double dMMxPixel,
int nParentId, const double ptMin[3], const double ptMax[3])
{
return ExeAddPhoto( wstrztoA( wsName), wstrztoA( wsFile),
ptOri, ptCen, dMMxPixel, nParentId, ptMin, ptMax) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetPhotoPath( int nId, wchar_t*& wsFile)
{
if ( &wsFile == nullptr)
return FALSE ;
string sName ;
if ( ! ExeGetPhotoPath( nId, sName))
return FALSE ;
wsFile = _wcsdup( stringtoW( sName)) ;
return (( wsFile == nullptr) ? FALSE : TRUE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtChangePhotoPath( int nId, const wchar_t* wsFile)
{
return ( ExeChangePhotoPath( nId, wstrztoA( wsFile)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetPhotoOrigin( int nId, double ptOri[3])
{
if ( ptOri == nullptr)
return FALSE ;
Point3d ptTmp ;
if ( ! ExeGetPhotoOrigin( nId, ptTmp))
return FALSE ;
VEC_FROM_3D( ptOri, ptTmp)
return TRUE ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetPhotoCenter( int nId, double ptCen[3])
{
if ( ptCen == nullptr)
return FALSE ;
Point3d ptTmp ;
if ( ! ExeGetPhotoCenter( nId, ptTmp))
return FALSE ;
VEC_FROM_3D( ptCen, ptTmp)
return TRUE ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetPhotoMMxPixel( int nId, double* pdMMxPixel)
{
if ( pdMMxPixel == nullptr)
return FALSE ;
return ( ExeGetPhotoMMxPixel( nId, *pdMMxPixel) ? TRUE : FALSE) ;
}