EgtGeomKernel :
- altre piccole ottimizzazioni nel cambio sistema di riferimento.
This commit is contained in:
+27
-6
@@ -666,6 +666,7 @@ ExtDimension::Translate( const Vector3d& vtMove)
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
m_ptP1.Translate( vtMove) ;
|
||||
@@ -685,9 +686,14 @@ ExtDimension::Translate( const Vector3d& vtMove)
|
||||
bool
|
||||
ExtDimension::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng)
|
||||
{
|
||||
// verifico validità dell'asse di rotazione
|
||||
if ( vtAx.IsSmall())
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
return ( m_vtN.Rotate( vtAx, dCosAng, dSinAng) &&
|
||||
@@ -711,9 +717,11 @@ ExtDimension::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, doubl
|
||||
// verifico non sia nulla
|
||||
if ( abs( dCoeffX) < EPS_ZERO && abs( dCoeffY) < EPS_ZERO && abs( dCoeffZ) < EPS_ZERO)
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// sistemo i vettori
|
||||
@@ -757,9 +765,11 @@ ExtDimension::Mirror( const Point3d& ptOn, const Vector3d& vtNorm)
|
||||
// verifico validità del piano di specchiatura
|
||||
if ( vtNorm.IsSmall())
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// eseguo il mirror dei versori
|
||||
@@ -795,9 +805,11 @@ ExtDimension::Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d
|
||||
// verifico validità dei parametri
|
||||
if ( vtNorm.IsSmall() || vtDir.IsSmall())
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// sistemo i vettori
|
||||
@@ -841,12 +853,15 @@ ExtDimension::ToGlob( const Frame3d& frRef)
|
||||
// verifico validità del frame
|
||||
if ( frRef.GetType() == Frame3d::ERR)
|
||||
return false ;
|
||||
// se riferimento globale, non devo fare alcunch�
|
||||
if ( AreSameFrame( frRef, GLOB_FRM))
|
||||
|
||||
// se frame identità, non devo fare alcunché
|
||||
if ( IsGlobFrame( frRef))
|
||||
return true ;
|
||||
// imposto ricalcolo
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// trasformo punto e versori
|
||||
@@ -871,12 +886,15 @@ ExtDimension::ToLoc( const Frame3d& frRef)
|
||||
// verifico validità del frame
|
||||
if ( frRef.GetType() == Frame3d::ERR)
|
||||
return false ;
|
||||
// se riferimento globale, non devo fare alcunch�
|
||||
if ( AreSameFrame( frRef, GLOB_FRM))
|
||||
|
||||
// se frame identità, non devo fare alcunché
|
||||
if ( IsGlobFrame( frRef))
|
||||
return true ;
|
||||
// imposto ricalcolo
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// trasformo punto e versori
|
||||
@@ -901,12 +919,15 @@ ExtDimension::LocToLoc( const Frame3d& frOri, const Frame3d& frDest)
|
||||
// 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
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// trasformo punto e versori
|
||||
|
||||
Reference in New Issue
Block a user