EgtInterface 1.5j6 :

- aggiunte numerose funzionalità in API.
This commit is contained in:
Dario Sassi
2014-10-30 08:51:03 +00:00
parent 2e33ab438e
commit e4d952bf32
18 changed files with 559 additions and 107 deletions
+66 -1
View File
@@ -403,4 +403,69 @@ __stdcall EgtFrame( int nId, Frame3d& frFrame)
}
// altrimenti errore
return FALSE ;
}
}
//-------------------------------------------------------------------------------
// Geo Transforms
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtVectorToIdGlob( double vtV[3], int nId)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// recupero il riferimento
// se gruppo -> il suo proprio espresso in globale
// se oggetto -> quello del gruppo cui appartiene in globale
Frame3d frRef ;
if ( ! pGeomDB->GetGroupGlobFrame( nId, frRef) &&
! pGeomDB->GetGlobFrame( nId, frRef))
return FALSE ;
// eseguo la trasformazione
Vector3d vtVG( vtV) ;
vtVG.ToGlob( frRef) ;
// aggiorno il parametro punto
VEC_FROM_3D( vtV, vtVG)
return TRUE ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtVectorToIdLoc( double vtV[3], int nId)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// recupero il riferimento
// se gruppo -> il suo proprio espresso in globale
// se oggetto -> quello del gruppo cui appartiene in globale
Frame3d frRef ;
if ( ! pGeomDB->GetGroupGlobFrame( nId, frRef) &&
! pGeomDB->GetGlobFrame( nId, frRef))
return FALSE ;
// eseguo la trasformazione
Vector3d vtVG( vtV) ;
vtVG.ToLoc( frRef) ;
// aggiorno il parametro punto
VEC_FROM_3D( vtV, vtVG)
return TRUE ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtPointToIdLoc( double ptP[3], int nId)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// recupero il riferimento
// se gruppo -> il suo proprio espresso in globale
// se oggetto -> quello del gruppo cui appartiene in globale
Frame3d frRef ;
if ( ! pGeomDB->GetGroupGlobFrame( nId, frRef) &&
! pGeomDB->GetGlobFrame( nId, frRef))
return FALSE ;
// eseguo la trasformazione
Point3d ptPL( ptP) ;
ptPL.ToLoc( frRef) ;
// aggiorno il parametro punto
VEC_FROM_3D( ptP, ptPL)
return TRUE ;
}