- piccola modifica alla mappa dei polinomi di bernstein.
This commit is contained in:
+2
-2
@@ -51,7 +51,7 @@ static bool ChangeStartForClosed( PolyLine& plU0, PolyLine& plU1, ICurveComposit
|
||||
static bool ParametrizeByLen( const ICurveComposite* pCurve, DBLVECTOR& vParam) ;
|
||||
static bool BuildCommonParam( const DBLMATRIX& mParam, DBLVECTOR& vCommonParam) ;
|
||||
|
||||
static unordered_map<pair<int,int>, DBLVECTOR, PairHash> m_mBernCache ; // mappa dei polinomi di bernstein
|
||||
static unordered_map<INTINT, DBLVECTOR, PairHashIntInt> m_mBernCache ; // mappa dei polinomi di bernstein
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
SurfBezier::SurfBezier( void)
|
||||
@@ -319,7 +319,7 @@ SurfBezier::GetCentroid( Point3d& ptCen) const
|
||||
bool
|
||||
SurfBezier::GetBernstein( double dU, int nDegU, DBLVECTOR& vBernU) const
|
||||
{
|
||||
pair<int, int> key = std::make_pair( nDegU, int( dU * pow(2,24))) ;
|
||||
INTINT key( nDegU, int( dU * pow(2,24))) ;
|
||||
if ( m_mBernCache.find( key) == m_mBernCache.end()) {
|
||||
DBLVECTOR vBern( nDegU + 1) ;
|
||||
GetAllBernstein( dU, nDegU, vBern) ;
|
||||
|
||||
Reference in New Issue
Block a user