EgtGeomKernel 1.5a6 : prima versione di scalatura non uniforme,

aggiunto comando COUNTER in tsc.
This commit is contained in:
Dario Sassi
2014-01-19 11:19:56 +00:00
parent adfa66cbb0
commit 4ebb43bf1e
27 changed files with 124 additions and 64 deletions
+9 -4
View File
@@ -204,11 +204,16 @@ Vector3d::Rotate( const Vector3d& vtAx, double dCosAng, double dSinAng)
// Scalatura non uniforme
//----------------------------------------------------------------------------
bool
Vector3d::Scale( double dCoeffX, double dCoeffY, double dCoeffZ)
Vector3d::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ)
{
x *= dCoeffX ;
y *= dCoeffY ;
z *= dCoeffZ ;
// verifico validità del frame
if ( frRef.GetType() == Frame3d::ERR)
return false ;
// ricavo le componenti sugli assi di scalatura, le scalo e riassemblo il vettore completo
*this = ( (*this) * frRef.VersX() * dCoeffX) * frRef.VersX() +
( (*this) * frRef.VersY() * dCoeffY) * frRef.VersY() +
( (*this) * frRef.VersZ() * dCoeffZ) * frRef.VersZ() ;
return true ;
}