EgtInterface 1.6j1 :

- aggiunte funzioni per foto e textures.
This commit is contained in:
Dario Sassi
2015-10-11 18:02:31 +00:00
parent 3730add9d3
commit 5025c28adf
6 changed files with 112 additions and 2 deletions
+55
View File
@@ -352,3 +352,58 @@ __stdcall EgtRemoveInfo( int nId, const wchar_t* wsKey)
{
return ( ExeRemoveInfo( nId, wstrztoA( wsKey)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSetTextureName( int nId, const wchar_t* wsTxrName)
{
return ( ExeSetTextureName( nId, wstrztoA( wsTxrName)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSetTextureFrame( int nId, const double vOrig[3],
const double vX[3], const double vY[3], const double vZ[3], int nRefType)
{
Frame3d frFrame ;
if ( ! frFrame.Set( vOrig, vX, vY, vZ))
return GDB_ID_NULL ;
return ( ExeSetTextureFrame( nId, frFrame, nRefType) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtRemoveTextureData( int nId)
{
return ( ExeRemoveTextureData( nId) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetTextureName( int nId, wchar_t*& wsTxrName)
{
string sTemp ;
if ( ! ExeGetTextureName( nId, sTemp))
return FALSE ;
wsTxrName = _wcsdup( stringtoW( sTemp)) ;
return (( wsTxrName == nullptr) ? FALSE : TRUE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetTextureFrame( int nId, int nRefId, double vOrig[3], double vX[3], double vY[3], double vZ[3])
{
// recupero il frame
Frame3d frFrame ;
if ( ! ExeGetTextureFrame( nId, nRefId, frFrame))
return FALSE ;
// assegno l'origine
VEC_FROM_3D( vOrig, frFrame.Orig())
// assegno il versore X
VEC_FROM_3D( vX, frFrame.VersX())
// assegno il versore Y
VEC_FROM_3D( vY, frFrame.VersY())
// assegno il versore Z
VEC_FROM_3D( vZ, frFrame.VersZ())
return TRUE ;
}
+51
View File
@@ -0,0 +1,51 @@
//----------------------------------------------------------------------------
// 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) ;
}
+2 -2
View File
@@ -424,10 +424,10 @@ __stdcall EgtUnProjectPoint( int nWinX, int nWinY, double ptP[3])
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtLoadTexture( const wchar_t* wsName, const wchar_t* wsFile,
double dMMxPix, double dDimX, double dDimY, BOOL bRepeat)
double dMMxPix, double dDimX, double dDimY, int nRepeat)
{
return ( ExeLoadTexture( wstrztoA( wsName), wstrztoA( wsFile),
dMMxPix, dDimX, dDimY, ( bRepeat != FALSE)) ? TRUE : FALSE) ;
dMMxPix, dDimX, dDimY, nRepeat) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BIN
View File
Binary file not shown.
+1
View File
@@ -230,6 +230,7 @@ copy $(TargetPath) \EgtProg\Dll64</Command>
<ClCompile Include="API_MachMgr.cpp" />
<ClCompile Include="API_Messages.cpp" />
<ClCompile Include="API_Nesting.cpp" />
<ClCompile Include="API_Photo.cpp" />
<ClCompile Include="API_Scene.cpp" />
<ClCompile Include="API_TscExec.cpp" />
<ClCompile Include="API_UiUnits.cpp" />
+3
View File
@@ -116,6 +116,9 @@
<ClCompile Include="API_Nesting.cpp">
<Filter>File di origine\API</Filter>
</ClCompile>
<ClCompile Include="API_Photo.cpp">
<Filter>File di origine\API</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="EgtInterface.rc">