Formatting.

This commit is contained in:
Jeff Young 2020-11-29 11:49:22 +00:00
parent 56bb91b042
commit 37178e3751
1 changed files with 3 additions and 9 deletions

View File

@ -60,9 +60,7 @@
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>
#include <math/vector2d.h> // for VECTOR2I #include <math/vector2d.h> // for VECTOR2I
#include <trigo.h> #include <trigo.h>
#include <algorithm> #include <algorithm>
#include <wx/wx.h>
typedef long long coord2_t; // must be big enough to hold 2*max(|coordinate|)^2 typedef long long coord2_t; // must be big enough to hold 2*max(|coordinate|)^2
@ -133,15 +131,13 @@ void BuildConvexHull( std::vector<wxPoint>& aResult, const std::vector<wxPoint>&
} }
void BuildConvexHull( std::vector<wxPoint>& aResult, void BuildConvexHull( std::vector<wxPoint>& aResult, const SHAPE_POLY_SET& aPolygons )
const SHAPE_POLY_SET& aPolygons )
{ {
BuildConvexHull( aResult, aPolygons, wxPoint( 0, 0 ), 0.0 ); BuildConvexHull( aResult, aPolygons, wxPoint( 0, 0 ), 0.0 );
} }
void BuildConvexHull( std::vector<wxPoint>& aResult, void BuildConvexHull( std::vector<wxPoint>& aResult, const SHAPE_POLY_SET& aPolygons,
const SHAPE_POLY_SET& aPolygons,
wxPoint aPosition, double aRotation ) wxPoint aPosition, double aRotation )
{ {
// Build the convex hull of the SHAPE_POLY_SET // Build the convex hull of the SHAPE_POLY_SET
@ -152,12 +148,10 @@ void BuildConvexHull( std::vector<wxPoint>& aResult,
const SHAPE_LINE_CHAIN& poly = aPolygons.COutline( cnt ); const SHAPE_LINE_CHAIN& poly = aPolygons.COutline( cnt );
for( int ii = 0; ii < poly.PointCount(); ++ii ) for( int ii = 0; ii < poly.PointCount(); ++ii )
{
buf.emplace_back( poly.CPoint( ii ).x, poly.CPoint( ii ).y ); buf.emplace_back( poly.CPoint( ii ).x, poly.CPoint( ii ).y );
}
} }
BuildConvexHull(aResult, buf ); BuildConvexHull( aResult, buf );
// Move and rotate the points according to aPosition and aRotation // Move and rotate the points according to aPosition and aRotation