EgtInterface 1.6d2 :
- in Lua in tutte le operazioni con creazione di più entità restituisco Id prima e numero - in Lua aggiunto oggetto BBox3d (non ancora con tutte le funzionalità) - in Lua aggiunta creazione superficie da BBox3d - in Lua aggiunte funzioni per avere BBox3d di oggetti - in Lua aggiunta OutBox - in Lua aggiunte funzioni per MachMgr.
This commit is contained in:
+68
-1
@@ -474,4 +474,71 @@ __stdcall EgtFrameLocToLoc( double ptOrig[3], double vtX[3], double vtY[3], doub
|
||||
VEC_FROM_3D( vtY, frTemp.VersY())
|
||||
VEC_FROM_3D( vtZ, frTemp.VersZ())
|
||||
return TRUE ;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// BBox3d
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtBBoxToGlob( double ptMin[3], double ptMax[3],
|
||||
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3])
|
||||
{
|
||||
// costruisco il frame di trasformazione
|
||||
Frame3d frRef ;
|
||||
if ( ! frRef.Set( ptO1, vtX1, vtY1, vtZ1))
|
||||
return FALSE ;
|
||||
// eseguo la trasformazione
|
||||
BBox3d b3Temp ;
|
||||
b3Temp.Set( ptMin, ptMax) ;
|
||||
if ( ! b3Temp.ToGlob( frRef))
|
||||
return FALSE ;
|
||||
// aggiorno i parametri del box
|
||||
VEC_FROM_3D( ptMin, b3Temp.GetMin())
|
||||
VEC_FROM_3D( ptMax, b3Temp.GetMax())
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtBBoxToLoc( double ptMin[3], double ptMax[3],
|
||||
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3])
|
||||
{
|
||||
// costruisco il frame di trasformazione
|
||||
Frame3d frRef ;
|
||||
if ( ! frRef.Set( ptO1, vtX1, vtY1, vtZ1))
|
||||
return FALSE ;
|
||||
// eseguo la trasformazione
|
||||
BBox3d b3Temp ;
|
||||
b3Temp.Set( ptMin, ptMax) ;
|
||||
if ( ! b3Temp.ToLoc( frRef))
|
||||
return FALSE ;
|
||||
// aggiorno i parametri del box
|
||||
VEC_FROM_3D( ptMin, b3Temp.GetMin())
|
||||
VEC_FROM_3D( ptMax, b3Temp.GetMax())
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtBBoxLocToLoc( double ptMin[3], double ptMax[3],
|
||||
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3],
|
||||
const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3])
|
||||
{
|
||||
// costruisco il frame sorgente
|
||||
Frame3d frSou ;
|
||||
if ( ! frSou.Set( ptO1, vtX1, vtY1, vtZ1))
|
||||
return FALSE ;
|
||||
// costruisco il frame destinazione
|
||||
Frame3d frDest ;
|
||||
if ( ! frDest.Set( ptO2, vtX2, vtY2, vtZ2))
|
||||
return FALSE ;
|
||||
// eseguo la trasformazione
|
||||
BBox3d b3Temp ;
|
||||
b3Temp.Set( ptMin, ptMax) ;
|
||||
if ( ! b3Temp.LocToLoc( frSou, frDest))
|
||||
return FALSE ;
|
||||
// aggiorno i parametri del box
|
||||
VEC_FROM_3D( ptMin, b3Temp.GetMin())
|
||||
VEC_FROM_3D( ptMax, b3Temp.GetMax())
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user