EgtInterface :
- aggiornamenti ad interfacce.
This commit is contained in:
+45
-18
@@ -103,8 +103,22 @@ __stdcall EgtMoveBoxCluster( int nId[], int nCount, double vtMove[3],
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtVerifyPartCluster( int nId[], int nCount, BOOL bReducedCut,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax)
|
||||
__stdcall EgtCreateOutRegion( int nParentId,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax, double dZ)
|
||||
{
|
||||
return ( ExeCreateOutRegion( nParentId, dXmin, dYmin, dXmax, dYmax, dZ) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCreateOutRegion2( int nParentId, int nOutCrvId)
|
||||
{
|
||||
return ( ExeCreateOutRegion( nParentId, nOutCrvId) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtVerifyPartCluster( int nId[], int nCount, BOOL bReducedCut)
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
@@ -115,7 +129,7 @@ __stdcall EgtVerifyPartCluster( int nId[], int nCount, BOOL bReducedCut,
|
||||
for ( int i = 0 ; i < nCount ; ++ i)
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
if ( ! ExeVerifyPartCluster( vIds, ( bReducedCut != FALSE), dXmin, dYmin,dXmax, dYmax))
|
||||
if ( ! ExeVerifyPartCluster( vIds, ( bReducedCut != FALSE)))
|
||||
return FALSE ;
|
||||
return TRUE ;
|
||||
}
|
||||
@@ -141,8 +155,25 @@ __stdcall EgtPackPartCluster( int nId[], int nCount, BOOL bReducedCut,
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vtMove[3],
|
||||
double dXmin, double dYmin, double dXmax, double dYmax)
|
||||
__stdcall EgtPackPartCluster2( int nId[], int nCount, BOOL bReducedCut, BOOL bBottomUp)
|
||||
{
|
||||
// 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
|
||||
if ( ! ExePackPartCluster( vIds, ( bReducedCut != FALSE), ( bBottomUp != FALSE)))
|
||||
return FALSE ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vtMove[3])
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
@@ -154,7 +185,7 @@ __stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vt
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
Vector3d vtM = vtMove ;
|
||||
if ( ! ExeMovePartCluster( vIds, ( bReducedCut != FALSE), vtM, dXmin, dYmin, dXmax, dYmax))
|
||||
if ( ! ExeMovePartCluster( vIds, ( bReducedCut != FALSE), vtM))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( vtMove, vtM)
|
||||
return TRUE ;
|
||||
@@ -162,8 +193,7 @@ __stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vt
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax)
|
||||
__stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg)
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0 || pdRotAngDeg == nullptr)
|
||||
@@ -174,15 +204,14 @@ __stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const d
|
||||
for ( int i = 0 ; i < nCount ; ++ i)
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
if ( ! ExeRotatePartCluster( vIds, ( bReducedCut != FALSE), ptCen, *pdRotAngDeg, dXmin, dYmin, dXmax, dYmax))
|
||||
if ( ! ExeRotatePartCluster( vIds, ( bReducedCut != FALSE), ptCen, *pdRotAngDeg))
|
||||
return FALSE ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, double vtMove[3],
|
||||
double dXmin, double dYmin, double dXmax, double dYmax)
|
||||
__stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, double vtMove[3])
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
@@ -194,7 +223,7 @@ __stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedC
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
Vector3d vtM = vtMove ;
|
||||
if ( ! ExeTgMovePartClusterOnCollision( vIds, ( bReducedCut != FALSE), vtM, dXmin, dYmin, dXmax, dYmax))
|
||||
if ( ! ExeTgMovePartClusterOnCollision( vIds, ( bReducedCut != FALSE), vtM))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( vtMove, vtM)
|
||||
return TRUE ;
|
||||
@@ -202,8 +231,7 @@ __stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedC
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved)
|
||||
__stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, BOOL* pbMoved)
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
@@ -215,7 +243,7 @@ __stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCu
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
bool bMoved ;
|
||||
if ( ! ExeAlignPartClusterOnCollision( vIds, ( bReducedCut != FALSE), dXmin, dYmin, dXmax, dYmax, bMoved))
|
||||
if ( ! ExeAlignPartClusterOnCollision( vIds, ( bReducedCut != FALSE), bMoved))
|
||||
return FALSE ;
|
||||
if ( pbMoved != nullptr)
|
||||
*pbMoved = bMoved ;
|
||||
@@ -224,8 +252,7 @@ __stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCu
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut, double dMaxMove,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved)
|
||||
__stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut, double dMaxMove, BOOL* pbMoved)
|
||||
{
|
||||
// verifico
|
||||
if ( nId == nullptr || nCount <= 0)
|
||||
@@ -237,7 +264,7 @@ __stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut
|
||||
vIds.push_back( nId[i]) ;
|
||||
// eseguo
|
||||
bool bMoved ;
|
||||
if ( ! ExeMoveToSnapPointOnCollision( vIds, ( bReducedCut != FALSE), dMaxMove, dXmin, dYmin, dXmax, dYmax, bMoved))
|
||||
if ( ! ExeMoveToSnapPointOnCollision( vIds, ( bReducedCut != FALSE), dMaxMove, bMoved))
|
||||
return FALSE ;
|
||||
if ( pbMoved != nullptr)
|
||||
*pbMoved = ( bMoved ? TRUE : FALSE) ;
|
||||
|
||||
Reference in New Issue
Block a user