EgtInterface :

- aggiunte funzioni.
This commit is contained in:
Dario Sassi
2014-10-21 10:50:26 +00:00
parent 4b52489cf8
commit 2e33ab438e
3 changed files with 155 additions and 27 deletions
+93 -15
View File
@@ -26,8 +26,21 @@ __stdcall EgtMove( int nId, double vVtMove[3])
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo traslazione
return ( pGeomDB->Translate( nId, vVtMove) ? TRUE : FALSE) ;
// eseguo traslazione singola
if ( nId != GDB_ID_SEL) {
return ( pGeomDB->Translate( nId, vVtMove) ? TRUE : FALSE) ;
}
// eseguo traslazione dei selezionati
else {
bool bOk = true ;
int nI = pGeomDB->GetFirstSelectedObj() ;
while ( nI != GDB_ID_NULL && bOk) {
if ( ! pGeomDB->Translate( nI, vVtMove))
bOk = false ;
nI = pGeomDB->GetNextSelectedObj() ;
}
return ( bOk ? TRUE : FALSE) ;
}
}
//-------------------------------------------------------------------------------
@@ -36,8 +49,21 @@ __stdcall EgtMoveGlob( int nId, double vVtMove[3])
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo traslazione
return ( pGeomDB->TranslateGlob( nId, vVtMove) ? TRUE : FALSE) ;
// eseguo traslazione singola
if ( nId != GDB_ID_SEL) {
return ( pGeomDB->TranslateGlob( nId, vVtMove) ? TRUE : FALSE) ;
}
// eseguo traslazione dei selezionati
else {
bool bOk = true ;
int nI = pGeomDB->GetFirstSelectedObj() ;
while ( nI != GDB_ID_NULL && bOk) {
if ( ! pGeomDB->TranslateGlob( nI, vVtMove))
bOk = false ;
nI = pGeomDB->GetNextSelectedObj() ;
}
return ( bOk ? TRUE : FALSE) ;
}
}
//-------------------------------------------------------------------------------
@@ -46,8 +72,21 @@ __stdcall EgtMoveGroup( int nId, double vVtMove[3])
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo traslazione
return ( pGeomDB->TranslateGroup( nId, vVtMove) ? TRUE : FALSE) ;
// eseguo traslazione singola
if ( nId != GDB_ID_SEL) {
return ( pGeomDB->TranslateGroup( nId, vVtMove) ? TRUE : FALSE) ;
}
// eseguo traslazione dei selezionati
else {
bool bOk = true ;
int nI = pGeomDB->GetFirstSelectedObj() ;
while ( nI != GDB_ID_NULL && bOk) {
if ( ! pGeomDB->TranslateGroup( nI, vVtMove))
bOk = false ;
nI = pGeomDB->GetNextSelectedObj() ;
}
return ( bOk ? TRUE : FALSE) ;
}
}
//-------------------------------------------------------------------------------
@@ -56,8 +95,21 @@ __stdcall EgtRotate( int nId, double vPtAx[3], double vVtAx[3], double dAngRotDe
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo rotazione
return ( pGeomDB->Rotate( nId, vPtAx, vVtAx, dAngRotDeg) ? TRUE : FALSE) ;
// eseguo rotazione singola
if ( nId != GDB_ID_SEL) {
return ( pGeomDB->Rotate( nId, vPtAx, vVtAx, dAngRotDeg) ? TRUE : FALSE) ;
}
// eseguo rotazione dei selezionati
else {
bool bOk = true ;
int nI = pGeomDB->GetFirstSelectedObj() ;
while ( nI != GDB_ID_NULL && bOk) {
if ( ! pGeomDB->Rotate( nI, vPtAx, vVtAx, dAngRotDeg))
bOk = false ;
nI = pGeomDB->GetNextSelectedObj() ;
}
return ( bOk ? TRUE : FALSE) ;
}
}
//-------------------------------------------------------------------------------
@@ -66,8 +118,21 @@ __stdcall EgtRotateGlob( int nId, double vPtAx[3], double vVtAx[3], double dAngR
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo rotazione
return ( pGeomDB->RotateGlob( nId, vPtAx, vVtAx, dAngRotDeg) ? TRUE : FALSE) ;
// eseguo rotazione singola
if ( nId != GDB_ID_SEL) {
return ( pGeomDB->RotateGlob( nId, vPtAx, vVtAx, dAngRotDeg) ? TRUE : FALSE) ;
}
// eseguo rotazione dei selezionati
else {
bool bOk = true ;
int nI = pGeomDB->GetFirstSelectedObj() ;
while ( nI != GDB_ID_NULL && bOk) {
if ( ! pGeomDB->RotateGlob( nI, vPtAx, vVtAx, dAngRotDeg))
bOk = false ;
nI = pGeomDB->GetNextSelectedObj() ;
}
return ( bOk ? TRUE : FALSE) ;
}
}
//-------------------------------------------------------------------------------
@@ -76,8 +141,21 @@ __stdcall EgtRotateGroup( int nId, double vPtAx[3], double vVtAx[3], double dAng
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo rotazione
return ( pGeomDB->RotateGroup( nId, vPtAx, vVtAx, dAngRotDeg) ? TRUE : FALSE) ;
// eseguo rotazione singola
if ( nId != GDB_ID_SEL) {
return ( pGeomDB->RotateGroup( nId, vPtAx, vVtAx, dAngRotDeg) ? TRUE : FALSE) ;
}
// eseguo rotazione dei selezionati
else {
bool bOk = true ;
int nI = pGeomDB->GetFirstSelectedObj() ;
while ( nI != GDB_ID_NULL && bOk) {
if ( ! pGeomDB->RotateGroup( nI, vPtAx, vVtAx, dAngRotDeg))
bOk = false ;
nI = pGeomDB->GetNextSelectedObj() ;
}
return ( bOk ? TRUE : FALSE) ;
}
}
//-------------------------------------------------------------------------------
@@ -88,7 +166,7 @@ __stdcall EgtScale( int nId, const double vOrig[3],
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo rotazione
// eseguo scalatura
Frame3d frFrame ;
if ( ! frFrame.Set( vOrig, vX, vY, vZ))
return FALSE ;
@@ -103,7 +181,7 @@ __stdcall EgtScaleGlob( int nId, const double vOrig[3],
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo rotazione
// eseguo scalatura
Frame3d frFrame ;
if ( ! frFrame.Set( vOrig, vX, vY, vZ))
return FALSE ;
@@ -118,7 +196,7 @@ __stdcall EgtScaleGroup( int nId, const double vOrig[3],
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// eseguo rotazione
// eseguo scalatura
Frame3d frFrame ;
if ( ! frFrame.Set( vOrig, vX, vY, vZ))
return FALSE ;