EgtInterface 1.6l8 :
- aggiornamento interfaccia per nesting.
This commit is contained in:
+63
-25
@@ -153,28 +153,6 @@ __stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vt
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetObstacleTangent( double vtTang[3])
|
||||
{
|
||||
Vector3d vtT ;
|
||||
if ( ! ExeGetObstacleTangent( vtT))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( vtTang, vtT)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetMovingTangent( double vtTang[3])
|
||||
{
|
||||
Vector3d vtT ;
|
||||
if ( ! ExeGetMovingTangent( vtT))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( vtTang, vtT)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg,
|
||||
@@ -196,8 +174,8 @@ __stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const d
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax)
|
||||
__stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, double vtMove[3],
|
||||
double dXmin, double dYmin, double dXmax, double dYmax)
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
@@ -208,8 +186,54 @@ __stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCu
|
||||
for ( int i = 0 ; i < nCount ; ++ i)
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
if ( ! ExeAlignPartClusterOnCollision( vIds, ( bReducedCut != FALSE), dXmin, dYmin, dXmax, dYmax))
|
||||
Vector3d vtM = vtMove ;
|
||||
if ( ! ExeTgMovePartClusterOnCollision( vIds, ( bReducedCut != FALSE), vtM, dXmin, dYmin, dXmax, dYmax))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( vtMove, vtM)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved)
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
return FALSE ;
|
||||
// riempio il vettore
|
||||
INTVECTOR vIds ;
|
||||
vIds.reserve( nCount) ;
|
||||
for ( int i = 0 ; i < nCount ; ++ i)
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
bool bMoved ;
|
||||
if ( ! ExeAlignPartClusterOnCollision( vIds, ( bReducedCut != FALSE), dXmin, dYmin, dXmax, dYmax, bMoved))
|
||||
return FALSE ;
|
||||
if ( pbMoved != nullptr)
|
||||
*pbMoved = bMoved ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut, double dMaxMove,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved)
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
return FALSE ;
|
||||
// riempio il vettore
|
||||
INTVECTOR vIds ;
|
||||
vIds.reserve( nCount) ;
|
||||
for ( int i = 0 ; i < nCount ; ++ i)
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
bool bMoved ;
|
||||
if ( ! ExeMoveToSnapPointOnCollision( vIds, ( bReducedCut != FALSE), dMaxMove, dXmin, dYmin, dXmax, dYmax, bMoved))
|
||||
return FALSE ;
|
||||
if ( pbMoved != nullptr)
|
||||
*pbMoved = bMoved ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -232,3 +256,17 @@ __stdcall EgtGetPartClusterCenterGlob( int nId[], int nCount, double ptCen[3])
|
||||
VEC_FROM_3D( ptCen, ptC)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
__stdcall EgtSaveCollInfo( void)
|
||||
{
|
||||
ExeSaveCollInfo() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
__stdcall EgtRestoreCollInfo( void)
|
||||
{
|
||||
ExeRestoreCollInfo() ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user