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
+4 -4
View File
@@ -63,22 +63,22 @@ Point3d::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, doub
// Scalatura non uniforme
//----------------------------------------------------------------------------
bool
Point3d::Scale( const Point3d& ptCen, double dCoeffX, double dCoeffY, double dCoeffZ)
Point3d::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ)
{
Vector3d vtDiff ;
// vettore dal centro al punto
vtDiff = *this - ptCen ;
vtDiff = *this - frRef.Orig() ;
if ( vtDiff.IsZero())
return true ;
// scalatura del vettore
if ( ! vtDiff.Scale( dCoeffX, dCoeffY, dCoeffZ))
if ( ! vtDiff.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ))
return false ;
// ricostruisco il punto
*this = ptCen + vtDiff ;
*this = frRef.Orig() + vtDiff ;
return true ;
}