EgtGeomKernel 1.5a6 : prima versione di scalatura non uniforme,
aggiunto comando COUNTER in tsc.
This commit is contained in:
+4
-4
@@ -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 ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user