public static void DrawPolygonContour(this IDebugCanvas canvas, Polygon2 poly, StrokeStyle strokeStyle) { for (var i = 0; i < poly.Points.Count - 1; i++) { canvas.DrawLineStrip(poly.Points.Map(ToDV3), strokeStyle); } }
public static void DrawRectangle(this IDebugCanvas canvas, IntRect2 nodeRect, float z, StrokeStyle strokeStyle) { canvas.DrawLineStrip( new [] { new DoubleVector3(nodeRect.Left, nodeRect.Top, z), new DoubleVector3(nodeRect.Right, nodeRect.Top, z), new DoubleVector3(nodeRect.Right, nodeRect.Bottom, z), new DoubleVector3(nodeRect.Left, nodeRect.Bottom, z), new DoubleVector3(nodeRect.Left, nodeRect.Top, z) }, strokeStyle); }
public static void DrawLineStrip(this IDebugCanvas canvas, IReadOnlyList <DoubleVector2> points, StrokeStyle strokeStyle) { canvas.DrawLineStrip(points.Map(ToDV3), strokeStyle); }
public static void DrawTriangle(this IDebugCanvas canvas, Triangle3 triangle, StrokeStyle strokeStyle) { canvas.DrawLineStrip( triangle.Points.Concat(new[] { triangle.Points.A }).Select(p => new DoubleVector3(p.X, p.Y, 0)).ToList(), strokeStyle); }
public static void DrawLineStrip(this IDebugCanvas canvas, IReadOnlyList <IntVector3> points, StrokeStyle strokeStyle) { canvas.DrawLineStrip(ToDoublePoints(points), strokeStyle); }