ShapeMerger
Introduction
Code Example
using FlatRedBall.Math.Geometry;Polygon firstPolygon = Polygon.CreateEquilateral(
6, // Number of sides
5, // radius
0); // angle of first point
Polygon secondPolygon = Polygon.CreateRectangle(
4, // ScaleX
4); // ScaleY
secondPolygon.X = 5;
secondPolygon.Y = 5;
// This call modifies the first polygon
ShapeMerger.Merge(firstPolygon, secondPolygon);
ShapeManager.AddPolygon(firstPolygon);
Last updated
Was this helpful?