EgtGeomKernel :
- altre piccole ottimizzazioni nel cambio sistema di riferimento.
This commit is contained in:
+46
@@ -630,8 +630,10 @@ VolZmap::Translate( const Vector3d& vtMove)
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo della grafica
|
||||
ResetGraphics() ;
|
||||
|
||||
// traslo il riferimento
|
||||
m_MapFrame.Translate( vtMove) ;
|
||||
return true ;
|
||||
@@ -644,8 +646,13 @@ VolZmap::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, doub
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// verifico validità dell'asse di rotazione
|
||||
if ( vtAx.IsSmall())
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo della grafica
|
||||
ResetGraphics() ;
|
||||
|
||||
// ruoto il riferimento
|
||||
m_MapFrame.Rotate( ptAx, vtAx, dCosAng, dSinAng) ;
|
||||
return true ;
|
||||
@@ -658,6 +665,10 @@ VolZmap::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCo
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// verifico non sia nulla
|
||||
if ( abs( dCoeffX) < EPS_ZERO && abs( dCoeffY) < EPS_ZERO && abs( dCoeffZ) < EPS_ZERO)
|
||||
return false ;
|
||||
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -668,6 +679,10 @@ VolZmap::Mirror( const Point3d& ptOn, const Vector3d& vtNorm)
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// verifico validità del piano di specchiatura
|
||||
if ( vtNorm.IsSmall())
|
||||
return false ;
|
||||
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -678,6 +693,10 @@ VolZmap::Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtD
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// verifico validità dei parametri
|
||||
if ( vtNorm.IsSmall() || vtDir.IsSmall())
|
||||
return false ;
|
||||
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -688,8 +707,17 @@ VolZmap::ToGlob( const Frame3d& frRef)
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// verifico validità del frame
|
||||
if ( frRef.GetType() == Frame3d::ERR)
|
||||
return false ;
|
||||
|
||||
// se frame identità, non devo fare alcunché
|
||||
if ( IsGlobFrame( frRef))
|
||||
return true ;
|
||||
|
||||
// imposto ricalcolo della grafica
|
||||
ResetGraphics() ;
|
||||
|
||||
// trasformo il riferimento
|
||||
m_MapFrame.ToGlob( frRef) ;
|
||||
return true ;
|
||||
@@ -702,8 +730,17 @@ VolZmap::ToLoc( const Frame3d& frRef)
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// verifico validità del frame
|
||||
if ( frRef.GetType() == Frame3d::ERR)
|
||||
return false ;
|
||||
|
||||
// se frame identità, non devo fare alcunché
|
||||
if ( IsGlobFrame( frRef))
|
||||
return true ;
|
||||
|
||||
// imposto ricalcolo della grafica
|
||||
ResetGraphics() ;
|
||||
|
||||
// trasformo il riferimento
|
||||
m_MapFrame.ToLoc( frRef) ;
|
||||
return true ;
|
||||
@@ -716,8 +753,17 @@ VolZmap::LocToLoc( const Frame3d& frOri, const Frame3d& frDest)
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// verifico validità dei frame
|
||||
if ( frOri.GetType() == Frame3d::ERR || frDest.GetType() == Frame3d::ERR)
|
||||
return false ;
|
||||
|
||||
// se i due riferimenti coincidono, non devo fare alcunché
|
||||
if ( AreSameFrame( frOri, frDest))
|
||||
return true ;
|
||||
|
||||
// imposto ricalcolo della grafica
|
||||
ResetGraphics() ;
|
||||
|
||||
// trasformo il riferimento
|
||||
m_MapFrame.LocToLoc( frOri, frDest) ;
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user