Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
316becb
Feat: Add constructor to LineDrawingInfo for customizable thickness, …
SoloByte Nov 26, 2025
af09a60
Refactor: More RectDrawing cleanup.
SoloByte Nov 26, 2025
749f532
Refactor: Remove unused slanted corner point methods from Rect class
SoloByte Nov 27, 2025
1c2d1b8
Feat: DrawSlantedCorners/DrawSlantedCornersRelative/DrawSlantedCorner…
SoloByte Nov 27, 2025
35a63ca
Refactor: clarifying comments added
SoloByte Nov 27, 2025
1fa05dd
Fix: Fixed Triangle Point in DrawSlantedCorners.
SoloByte Nov 27, 2025
aded640
Feat: DrawCornersRounded function added.
SoloByte Nov 27, 2025
754c599
Refactor: Remove DrawSegmentCap method as DrawRoundCap suffices
SoloByte Nov 28, 2025
a206f18
Feat: DrawCorners draw end cap added
SoloByte Nov 28, 2025
7d13218
Feat: Add rotation methods to convert Rect to Quad
SoloByte Nov 28, 2025
61a9d1b
Refactor: RectDrawing cleaned up and all overloads with rotation remo…
SoloByte Nov 28, 2025
9ca5ed4
Refactor: More cleanup
SoloByte Nov 28, 2025
c9fa285
Feat: DrawQuadLines added parameters for rounded drawing.
SoloByte Nov 28, 2025
c3090d6
Feat: Quad & Rect Draw & DrawLines with rounded parameters finished.
SoloByte Nov 28, 2025
2706ab2
Refactor: Update Draw methods to simplify parameters for background a…
SoloByte Nov 28, 2025
0f71c71
Refactor: Cleanup
SoloByte Nov 28, 2025
23391fe
Refactor: DrawCornerHelper renamed to DrawRoundedCornerHelper
SoloByte Dec 1, 2025
8f0a4a9
Feat: New DrawQuadLinesPercentageHelper function finished. (testing n…
SoloByte Dec 1, 2025
b269cf4
Fix: Sharp corner line percentage drawing works now in ccw and cw dir…
SoloByte Dec 2, 2025
764a6ae
Fix: DrawQuadLinesPercentageHelper works now.
SoloByte Dec 2, 2025
7153dc0
Refactor: DrawQuadLinesPercentageHelper rounded now starts with a ful…
SoloByte Dec 2, 2025
9ad5f08
Fix: Sequencer.cs fix to remove linq requirement.
SoloByte Dec 3, 2025
852679a
Refactor: Update DrawQuad and Draw methods to improve parameter descr…
SoloByte Dec 3, 2025
de3d761
Enhance: Add normal vector properties and size calculation method for…
SoloByte Dec 3, 2025
e5ddbec
Enhance: Implement corner drawing methods for quads and rectangles wi…
SoloByte Dec 3, 2025
c0aab33
Refactor: Commented-out code removed.
SoloByte Dec 3, 2025
d3c02c1
Enhance: Add properties to access quad vertices with rect connotation.
SoloByte Dec 3, 2025
777817d
Refactor: DrawSlantedCorners region restructured.
SoloByte Dec 3, 2025
b7d6c6c
Feat: QuadDrawing slanted corners started.
SoloByte Dec 3, 2025
558395f
Feat: QuadDrawing DrawSlantedCorners / DrawSlantedCornersLines finished.
SoloByte Dec 4, 2025
a3b38f1
Refactor: Regions added.
SoloByte Dec 4, 2025
8f6f075
Feat: Line Drawing helpers started.
SoloByte Dec 4, 2025
557404d
Feat: added alternative formula for AngleRad.
SoloByte Dec 4, 2025
2f1189d
Feat: Started DrawLinesMiteredHelper
SoloByte Dec 4, 2025
f13eb3e
Feat: Using the new AngleRad formula.
SoloByte Dec 4, 2025
3b6d30d
Feat: Add constant radian values for common angles
SoloByte Dec 6, 2025
cbd0bb5
Feat: Basic Polygon Outline mitered drawing works now.
SoloByte Dec 6, 2025
d28fa52
Feat: Add unsigned angle calculations for vectors and corner classifi…
SoloByte Dec 6, 2025
bdf0480
Feat: Add extension method for ClassifyCorner to improve usability
SoloByte Dec 6, 2025
0f441ec
Refactor: Rename cornerType to type in ClassifyCorner method for clarity
SoloByte Dec 6, 2025
770abcc
Feat: More Polygon DrawLinesMiteredHelper improvements.
SoloByte Dec 6, 2025
08ad7f2
Feat: DrawLinesHelperMitered now works with sharp and mitered corners.
SoloByte Dec 8, 2025
2f57fe3
Refactor: Some functions changed to statement body.
SoloByte Dec 9, 2025
9af3344
Merge branch 'main' into circle-poly-improved-outline-drawing
SoloByte Jan 22, 2026
5bdc2ed
Feat: Add ToAbsolute() method to convert polygon coordinates to world…
SoloByte Jan 22, 2026
e98ba0d
Feat: DrawLinesRounded helper started in PolygonDrawing.
SoloByte Jan 22, 2026
b9c4cb2
Feat: PolygonMath GetNext/PreviousVertex functions added.
SoloByte Jan 22, 2026
584b26a
Doc: Add xml summaries to GetNextVertex and GetPreviousVertex methods.
SoloByte Jan 22, 2026
da4344e
Feat: Add GetNextIndex and GetPreviousIndex methods to PolygonMath fo…
SoloByte Jan 22, 2026
1d9bf47
Feat: DrawLinesRounded function implemented.
SoloByte Jan 22, 2026
ae41766
Refactor: Index functions moved from PolygonMath to PointsMath.
SoloByte Jan 23, 2026
c249b2f
Feat: DrawLines with rounded corners works now correctly!
SoloByte Jan 23, 2026
40df49c
Fix: Reverted AngleRad back to my code. (Never trust AI - This single…
SoloByte Jan 23, 2026
8a7d909
Feat: Add methods to compute edge normals for polygons
SoloByte Jan 26, 2026
917fdac
Feat: Enhance IsColinear method with tolerance and zero-length handling
SoloByte Jan 26, 2026
6af7f86
Feat: Add colinearity checks for direction vectors and points with to…
SoloByte Jan 26, 2026
62e6c41
Feat: Improve IsColinearAngle method to handle unsigned angles and ad…
SoloByte Jan 26, 2026
e5065a0
Feat: GenerateRounded function implemented (works but needs some clea…
SoloByte Jan 26, 2026
1925b43
Feat: Add methods to remove approximately collinear and duplicate ver…
SoloByte Jan 26, 2026
873879b
Feat: GenerateRounded functions in PolygonMath finished.
SoloByte Jan 27, 2026
fd00b0b
Docs: Xml Summaries added to GenerateRounded & GenerateRoundedCopy me…
SoloByte Jan 27, 2026
28162ce
Feat: DrawRounded function finished in PolygonDrawing.cs
SoloByte Jan 27, 2026
1133b54
Docs: Some xml summaries improved.
SoloByte Jan 28, 2026
9558876
Feat: Add SmoothCopy method for creating a smoothed copy of the polygon
SoloByte Jan 29, 2026
2a6e4bd
Docs: Inflate xml summary improved in ShapeClipper.cs
SoloByte Jan 29, 2026
5e76d90
Feat: Add ClassifyCorner2 method for corner classification based on d…
SoloByte Jan 29, 2026
65f7d31
Feat: New DrawLinesHelper function implemented using Clipper2 library…
SoloByte Jan 29, 2026
a67291d
Refactor: Rename GenerateRoundedCopy and GenerateRounded methods to R…
SoloByte Jan 29, 2026
31c654b
Feat: DrawLinesFast functions added (no transparent colors)
SoloByte Jan 29, 2026
43829a2
Todo: Warning added.
SoloByte Jan 30, 2026
449f18c
Feat: New ref based Triangulate Method added to Polygon.cs
SoloByte Jan 30, 2026
484276b
Feat: Add OutlineTriangulation to AsteroidObstacle for improved outli…
SoloByte Jan 30, 2026
9f0c8dc
Docs: Xml summaries improved for DrawRounded, DrawPolygonConvex, and …
SoloByte Jan 30, 2026
e92cb6b
Refactor: Polygons.cs and Polylines.cs moved from ShapeClipper.cs to …
SoloByte Jan 30, 2026
7c3e8fa
Feat: Custom Enums added for Clipper2 JoinType, EndType, FillRule to …
SoloByte Jan 30, 2026
8c7fc30
Docs: Enum Conversion xml summaries added
SoloByte Jan 30, 2026
f61fbfe
Feat: Add InflateMany methods for Polygons and Polylines to support o…
SoloByte Jan 30, 2026
9168b99
Feat: ShapeClipperEnums are now used in parameters.
SoloByte Jan 30, 2026
3bc519c
Docs: Add TODO comment regarding mitered variants and artifacts in tr…
SoloByte Jan 30, 2026
6a882f6
Feat: New function overloads for class conversion added that use ref …
SoloByte Feb 2, 2026
2866ad1
Refactor: All conversion function that use Polygon or Polyline were u…
SoloByte Feb 2, 2026
21cebb9
Docs: Add TODO comments for renaming drawing methods and updating doc…
SoloByte Feb 2, 2026
dd4f83e
Refactor: ShapeClipper Class Conversion function improvements and cle…
SoloByte Feb 2, 2026
8d2686a
Feat: Added new RoundCopy function with ref parameter.
SoloByte Feb 2, 2026
c7ff0f1
Refactor: Added new regions for Helper Members and Getters.
SoloByte Feb 2, 2026
70ddd6b
Refactor: Triangulation based functions moved from PolygonDrawing and…
SoloByte Feb 2, 2026
9c85e76
Todo: Todos added to CircleDrawing.cs
SoloByte Feb 2, 2026
5235cc0
Fix: Updated polygon drawing method to use DrawLines (DrawLinesFast w…
SoloByte Feb 2, 2026
11419a2
Refactor: Changed AsteroidShard drawing to full triangles instead of …
SoloByte Feb 2, 2026
e92720d
Refactor: Regions added to ShapeDrawing.cs
SoloByte Feb 3, 2026
79daa02
Refactor: More clean up.
SoloByte Feb 3, 2026
4c32065
Refactor: Relative points methods removed
SoloByte Feb 3, 2026
739c6cf
Refactor: Triangulation, OutlineTriangulation, OutlinePerimeterTriang…
SoloByte Feb 4, 2026
d48f09f
Add: DrawVertices method moved to Points.cs to render circles at each…
SoloByte Feb 4, 2026
e8c8de4
Refactor: Clean up and simplify DrawGapped method in GappedDrawing.cs
SoloByte Feb 4, 2026
a635af2
Refactor: DrawVertices method removed (Points.cs now has this function)
SoloByte Feb 4, 2026
dd8f1a2
Refactor: ShapeDrawing.cs removed.
SoloByte Feb 4, 2026
39ef49e
Docs: Missing xml summaries added to PolygonDrawing.cs methods.
SoloByte Feb 4, 2026
5f47704
Todo: Todos added for looking at DrawSlantedCorners with transparent …
SoloByte Feb 4, 2026
905eea0
Refactor: Some cleanup with regions.
SoloByte Feb 5, 2026
dff2445
Feat: DrawCorneredTransparent started.
SoloByte Feb 5, 2026
67f0594
Todo: Notes added for necessary changes + some debug functions added.
SoloByte Feb 5, 2026
8b1cc1f
Feat: DrawCornerAbsolute method finshed
SoloByte Feb 5, 2026
9129a3a
Fix: ContentPack GetFileData now looks for windows & unix style path …
SoloByte Feb 9, 2026
9c71020
Feat: DrawCorneredTransparent improvements.
SoloByte Feb 10, 2026
15dcd25
Feat: DrawCorneredTransparent version finished. (They are actually fa…
SoloByte Feb 10, 2026
c8f63a5
Fix: DrawCornered variants index wrapping added to fix crashes.
SoloByte Feb 10, 2026
ad33c94
Feat: DrawLinesConvex started.
SoloByte Feb 10, 2026
47f0456
Feat: DrawLinesConvex is now working correctly.
SoloByte Feb 11, 2026
7a96b41
Feat: DrawLinesConvex finished with docs and GetConvexPolygonMaxLineT…
SoloByte Feb 11, 2026
3867685
Feat: DrawLinesTransparent overhaul started.
SoloByte Feb 11, 2026
80708b7
Docs: DrawCorneredAbsoluteTransparent, DrawCorneredRelativeTransparen…
SoloByte Feb 12, 2026
f61fe2b
Refactor: Moved CalculatePolygonMaxLineThickness from PolygonDrawing.…
SoloByte Feb 12, 2026
7776515
Feat: DrawLinesPerimeterTransparent & DrawsLinesPercentageTransparent…
SoloByte Feb 12, 2026
3654d67
Feat: miterLimit and beveled parameters added to DrawLinesPerimeter/P…
SoloByte Feb 12, 2026
ccd6c7c
Feat: Basic DrawLinesPerimeterTransparent works now.
SoloByte Feb 13, 2026
005c6db
Fix: WrapIndex now correctly handles negative indices that are lower …
SoloByte Feb 16, 2026
1a24937
Feat: DrawLinesPerimeterTransparent function now works correctly with…
SoloByte Feb 16, 2026
acc3ec6
Feat: New DrawRoundCap function added
SoloByte Feb 16, 2026
f4c9390
Feat: DrawLinesPerimeterTransparent methods finished.
SoloByte Feb 16, 2026
ae647a0
Docs: Missing xml summaries added to Percentage/Perimeter drawing fun…
SoloByte Feb 16, 2026
75fc510
Feat: All predefined colors in System.Drawing.Color added as static p…
SoloByte Feb 16, 2026
d8bf225
Feat: Implicit Conversion added.
SoloByte Feb 16, 2026
e093b53
Refactor: Clear color removed (replaced by transparent)
SoloByte Feb 16, 2026
ab5c013
Refactor: Region renamed.
SoloByte Feb 17, 2026
cd8f76d
Feat: Added new GenerateCircleSectorOutlineTriangulation method.
SoloByte Feb 17, 2026
2e4b0a3
Feat: DrawCircleSectorLinesClosedInternal draws the closing segments …
SoloByte Feb 17, 2026
63aa6e9
Feat: Add ToPositiveAngleRad method to convert angles to positive equ…
SoloByte Feb 18, 2026
11886b7
Feat: DrawCircleSectorLinesClosedFastInternal added for opaque colors.
SoloByte Feb 18, 2026
85e9483
Feat: DrawCircleSectorLinesClosedInternal now works with negative dir…
SoloByte Feb 18, 2026
0f62c67
Feat: CalculateCircleDrawingParameters implemented in CircleDrawing.cs
SoloByte Feb 18, 2026
a0511d8
Refactor: Some Clean up.
SoloByte Feb 18, 2026
48b6d5e
Fix: Inverse and GetFactor now clamp value between Min and Max
SoloByte Feb 19, 2026
a3f04a4
Feat: GetRect() and GetCircle() method added.
SoloByte Feb 19, 2026
9dfed04
Feat: LerpInverse() function added.
SoloByte Feb 19, 2026
e342f12
Refactor: CircleDrawing.cs smoothness parameter added and any sides/s…
SoloByte Feb 19, 2026
04a3242
Feat: GetCircleSmoothness functions added to CircleDrawing.cs
SoloByte Feb 20, 2026
9745b7a
Refactor: A lot of cleanup in CircleDrawing.cs, a lot of internal alg…
SoloByte Feb 20, 2026
fafadc4
Feat: Add ScaleSegment method to SegmentMath.cs for scaling segments …
SoloByte Feb 23, 2026
f9585a6
Refactor: Adjust ScaleSegment method parameters for improved clarity
SoloByte Feb 23, 2026
34e2927
Refactor: Regions moved around to be clearer.
SoloByte Feb 23, 2026
4de9fa9
Feat: DrawPercentage function added.
SoloByte Feb 23, 2026
d9c77db
Refactor: Remove commented-out code in CircleDrawing.cs for cleaner i…
SoloByte Feb 23, 2026
ee439ce
Refactor: RingDrawing.cs redundent functions removed and class cleane…
SoloByte Feb 23, 2026
e5513ca
Refactor: RingDrawing.cs removed and all functions moved to CircleDra…
SoloByte Feb 23, 2026
2dbf29c
Fix: DrawSegment with LineCapType.Capped lo longer shrinks beyond seg…
SoloByte Feb 24, 2026
a43a32f
Refactor: Old docs removed.
SoloByte Feb 24, 2026
c865854
Fix: Fixed DrawSectorLine calls in Examples.
SoloByte Feb 24, 2026
9783d93
Docs: Added new xml summaries and updated existing xml summaries in C…
SoloByte Feb 24, 2026
d17b56b
Docs: Added XML summaries for DrawRoundCap methods in SegmentDrawing.cs
SoloByte Feb 24, 2026
b49580b
Docs: Various xml summaries updated with smoothness parameter.
SoloByte Feb 24, 2026
e8fb548
Feat: Added CalculateMaxLineThickness to TriangleMath (moved from Tri…
SoloByte Feb 25, 2026
e48a42b
Feat: Added IsCollinear method to TriangleMath for collinearity check
SoloByte Feb 25, 2026
7f2a0e7
Feat: Added GetIncenter method to TriangleMath for calculating the in…
SoloByte Feb 25, 2026
7803600
Feat: Refactor CalculateMaxLineThickness to use incenter calculation …
SoloByte Feb 25, 2026
32e014e
Refactor: TriangleMath CalculateMaxLineThickness removed.
SoloByte Feb 25, 2026
8d3048e
Merge branch 'main' into circle-poly-improved-outline-drawing
SoloByte Feb 25, 2026
71a865c
Feat: Static Class TriangleBatcher implemented.
SoloByte Feb 26, 2026
938a646
Docs: Xml summaries added.
SoloByte Feb 26, 2026
eabe7ba
Docs: some xml summaries improved.
SoloByte Feb 26, 2026
4d71e39
Feat: TriangleBatcher now caches set color and resets to this color a…
SoloByte Feb 26, 2026
7c05b78
Refactor: TriangleBatcher and TriangleBatch unified into the same class.
SoloByte Feb 26, 2026
3610aff
Feat: Simple PerformanceMeasureWatch added.
SoloByte Feb 26, 2026
9d6ba42
Refactor: GetData() function added.
SoloByte Feb 26, 2026
479e5c1
Refactor: Data changed to TimeSpan from ticks (long).
SoloByte Feb 26, 2026
479b950
Docs: xml summaries added.
SoloByte Feb 26, 2026
82c8faf
Docs: Xml summary updated.
SoloByte Feb 26, 2026
394111e
Refactor: Todo removed.
SoloByte Feb 26, 2026
cb6e0d3
Feat: TriangleDrawing DrawLinesPercentage finished.
SoloByte Feb 27, 2026
230ba37
Docs: Xml summaries finished.
SoloByte Feb 27, 2026
f42544b
Docs: Xml summaries finished.
SoloByte Feb 27, 2026
1e414a2
Refactor: New Regions added
SoloByte Feb 27, 2026
9bf0893
Feat: Add ToQuad method to convert rectangle to quadrilateral
SoloByte Feb 27, 2026
6801610
Feat: Add methods to get the minimum and maximum side lengths of a tr…
SoloByte Feb 27, 2026
57121a2
Feat: Add LerpByLength method for vector interpolation by distance
SoloByte Feb 27, 2026
6a2f79c
Feat: Added DrawCorners and DrawCornersRelative
SoloByte Feb 27, 2026
0918afb
Refactor: RectDrawing cleanup based on QuadDrawing (most non-extensio…
SoloByte Feb 27, 2026
2d947c8
Feat: QuadMath Size, DiagonalLength, DiagonalLengthSquared, RotationR…
SoloByte Mar 2, 2026
3cc86e4
Merge branch 'main' into circle-poly-improved-outline-drawing
SoloByte Mar 2, 2026
ff5d0bb
Refactor: QuadDrawing DrawCorners and DrawCornersRelative reworked
SoloByte Mar 3, 2026
e52d27a
Feat: New DrawCorners function a working 100% correctly now.
SoloByte Mar 3, 2026
5881f12
Docs: Added xml summaries to DrawCorners and DrawCornersRelative func…
SoloByte Mar 3, 2026
1fca653
Refactor: DrawSlanterCorners with 4 cornerLengths reworked to not use…
SoloByte Mar 4, 2026
b206fcf
Refactor: QuadDrawing and RectDrawing DrawSlantedCorners functions (a…
SoloByte Mar 4, 2026
2f096c8
Refator: DrawChamferedCornerLines thickness parameter renamed to line…
SoloByte Mar 4, 2026
f7462f6
Refactor: DrawChamferedCornerLines thickness parameter renamed to lin…
SoloByte Mar 4, 2026
4921aa9
Todos: Notes for problems added.
SoloByte Mar 4, 2026
04d5f3d
Todo: Notes for problem ChangeSize/SetSize/ScaleSize functions added.
SoloByte Mar 4, 2026
c10c77d
Feat: Right Triangle Math region added.
SoloByte Mar 6, 2026
dba2c71
Feat: DrawChamferedCornersLines with cornerLength parameter works now.
SoloByte Mar 6, 2026
f33dd89
Feat: Add functions to calculate isosceles triangle side and base len…
SoloByte Mar 9, 2026
86f1eb7
Refactor: QuadDrawing DrawChamferedCornersLines cleanup started.
SoloByte Mar 10, 2026
5844811
Refactor: DrawChamferedCornersLines more cleanup.
SoloByte Mar 10, 2026
4b638b9
Fix: QuadDrawing DrawChamferedCornersLines fixed with clamping corner…
SoloByte Mar 10, 2026
b7a0866
Refactor: DrawCorner and DrawEdge functions moved from DrawChamferedC…
SoloByte Mar 10, 2026
698c48a
Fix: DrawChamferedCornersLines with 1 and 2 cornerLength parameters f…
SoloByte Mar 11, 2026
eff739b
Refactor: Improvements to DrawChamferedCornersLines with 4 corner len…
SoloByte Mar 11, 2026
8aac51d
Refactor: Some more clean up.
SoloByte Mar 12, 2026
b3aa5b8
Feat: InsetConvexPolygon system added. (needed for chamfered rect/qua…
SoloByte Mar 12, 2026
bad2147
Feat: Enhance InsetConvex and add TriangulateConvexOutline functions …
SoloByte Mar 13, 2026
76be540
Refactor: Cleanup of chamfered corner lines helpers.
SoloByte Mar 13, 2026
d2b99c5
Feat: QuadDrawing all DrawChamferedCornerLines and DrawChamferedCorne…
SoloByte Mar 13, 2026
ae6ba99
Refactor: QuadDrawing DrawLines and DrawLinesPercentage cleanup.
SoloByte Mar 13, 2026
ef74e76
Docs: Xml summaries added to DrawChamferedCornersLines & DrawChamfere…
SoloByte Mar 14, 2026
73e3a5f
Refactor: Some Quad constructors reworked.
SoloByte Mar 14, 2026
aa86256
Fix: Changed ScaleSize function in rect to ChangeSize function and it…
SoloByte Mar 14, 2026
b14f664
Refactor: Quad changed Center calculation to cheaper method and remov…
SoloByte Mar 14, 2026
a88faf1
Feat: Add methods to negate width and height in Size class
SoloByte Mar 14, 2026
3b27880
Feat: Added Inverse function to Size struct.
SoloByte Mar 14, 2026
c35683a
Refactor: Quad Position, Size, and Rotation related functions overhau…
SoloByte Mar 14, 2026
bcb939c
Docs: Added xml summaries to Size, Rotation, and Transform functions.
SoloByte Mar 14, 2026
3242d16
Refactor: Simplify corner length checks and adjust line thickness in …
SoloByte Mar 16, 2026
60fc5cc
Refactor: RectDrawing cleanup.
SoloByte Mar 16, 2026
50bcb6a
Refactor: Remove TODO comments and clean up whitespace in RectDrawing
SoloByte Mar 16, 2026
90945d0
Docs: Remaining function documented.
SoloByte Mar 16, 2026
a88e462
Refactor: All functions from GappedDrawing.cs moved to the shapes *Dr…
SoloByte Mar 16, 2026
9524157
Refactor: Update RotateToQuad method to use pivot parameter and simpl…
SoloByte Mar 16, 2026
632271e
Docs: Documented UI drawing functions
SoloByte Mar 16, 2026
6c46da6
Feat: Added ShapeDrawingTestExample to demonstrate various shape draw…
SoloByte Mar 16, 2026
98f6c13
Fix: Fixed incorrect font scaling in TextFont.Draw with rotDeg parame…
SoloByte Mar 16, 2026
2710f81
Refactor: Simplify ShapeDrawingTestExample by removing unused paramet…
SoloByte Mar 16, 2026
3dc9f97
Refactor: Remove unnecessary blank line in TriangleDrawing.cs
SoloByte Mar 17, 2026
11e50cd
Refactor: Remove unused method call in ShapeDrawingTestExample
SoloByte Mar 17, 2026
b46d0cf
Feat: PingPong tween added.
SoloByte Mar 17, 2026
d87e005
Feat: ControlNode IsDown system added alongside the Pressed system.
SoloByte Mar 17, 2026
38f98b8
Refactor: Remove unused using directive and clean up comments in Cont…
SoloByte Mar 17, 2026
65dcba5
Docs: Added PingPong function xml summary.
SoloByte Mar 17, 2026
f6fe990
Docs: Missing xml summaries added to ControlNode.cs functions.
SoloByte Mar 17, 2026
928ea7f
Feat: ClipperImmediate2D.cs started.
SoloByte Mar 17, 2026
4ce4d86
Refactor: Small improvements and fixes.
SoloByte Mar 18, 2026
965be09
Todo: ShapeClipper todos added
SoloByte Mar 18, 2026
988d4a1
Refactor: regions added to ClipperImmediate2D
SoloByte Mar 18, 2026
84dce21
Todo: Todos refactored for clear structure of what to do next.
SoloByte Mar 18, 2026
e9d9a34
Todo: Todos updated
SoloByte Mar 18, 2026
aa85ef7
Refactor: Clipper wrapping refactor started.
SoloByte Mar 20, 2026
71db84a
Refactor: ClipperImmediate2D clean up.
SoloByte Mar 21, 2026
15e09d5
Refactor: ShapeClipper overhaul finished. (Major overhaul of Clipper2…
SoloByte Mar 25, 2026
b8fb003
Refactor: Points & PointsMath cleanup.
SoloByte Mar 26, 2026
8b5e00d
Docs: Xml summaries updated / added for Points.cs and PointsMath.cs.
SoloByte Mar 26, 2026
aa6f6fb
Refactor: Segments cleanup.
SoloByte Mar 26, 2026
2de8a1b
Fix: Polygon, Rect, and Triangle GetRandomPointsOnEdge() function fixed.
SoloByte Mar 26, 2026
c7a418e
Docs: Cleaned up / Updated / Added Docs for new changes.
SoloByte Mar 26, 2026
7c72637
Refactor: ConvexHull system moved from PolygonConvexHull.cs to Points.
SoloByte Mar 26, 2026
72dbc28
Refactor: GetProjectedShapePoints result parameter overload added to …
SoloByte Mar 26, 2026
f322a5a
Todo: Todo added.
SoloByte Mar 26, 2026
a6b6477
Docs: Missing docs added.
SoloByte Mar 28, 2026
16303d4
Docs: Docs updated.
SoloByte Mar 28, 2026
1b232ba
Refactor: some functions improved with buffers.
SoloByte Mar 28, 2026
9dd9181
Docs: Xml summaries added to all functions
SoloByte Mar 28, 2026
0c9804a
Refactor: Polygon/Polyline transform functions moved to parent Points…
SoloByte Mar 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Examples/GameloopExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ private void DrawRoundedCursor(Vector2 tip, float size, ColorRgba colorRgba)
var top = circleCenter + new Vector2(0, -1) * size;
SegmentDrawing.DrawSegment(tip, left, 1f, colorRgba, LineCapType.CappedExtended, 3);
SegmentDrawing.DrawSegment(tip, top, 1f, colorRgba, LineCapType.CappedExtended, 3);
CircleDrawing.DrawCircleSectorLines(circleCenter, size, 180, 270, 1f, colorRgba, false, 4f);
var circle = new Circle(circleCenter, size);
circle.DrawSectorLines(180, 270, 0f, 1f, colorRgba, 0.65f);
}

protected override void Update(GameTime time, ScreenInfo game, ScreenInfo gameUi, ScreenInfo ui)
Expand Down
73 changes: 33 additions & 40 deletions Examples/Scenes/ExampleScenes/AsteroidMiningExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
using ShapeEngine.Geometry.TriangleDef;
using ShapeEngine.Input;
using ShapeEngine.Random;
using ShapeEngine.ShapeClipper;

namespace Examples.Scenes.ExampleScenes
{

public class AsteroidShard : GameObject
{
// private Polygon shape;
Expand Down Expand Up @@ -81,10 +82,13 @@ public override void Update(GameTime time, ScreenInfo game, ScreenInfo gameUi, S

public override void DrawGame(ScreenInfo game)
{
//SDrawing.DrawCircleFast(pos, 4f, RED);
var c = this.color.ColorRgba.ChangeAlpha((byte)(255 * lifetimeF));
//color = this.color;
shape.DrawLines(2f * lifetimeF, c);
var alpha = (int)(400 * lifetimeF);
if(alpha > 255) alpha = 255;
var c = color.ColorRgba.SetAlpha((byte)alpha);

// shape.DrawLines(2f * lifetimeF, c);

shape.Draw(c);
}

public override void DrawGameUI(ScreenInfo gameUi)
Expand All @@ -94,6 +98,7 @@ public override void DrawGameUI(ScreenInfo gameUi)

public override Rect GetBoundingBox() { return shape.GetBoundingBox(); }
}

public class Asteroid : CollisionObject
{
internal class DamagedSegment
Expand Down Expand Up @@ -448,15 +453,17 @@ public override void DrawGame(ScreenInfo game)
if (hybernate) return;
var c = Colors.Cold;
shape.DrawLines(4f, c);
CircleDrawing.DrawCircle(tip, 8f, c);
var circle = new Circle(tip, 8f);
circle.Draw(c, 0.1f);

if (laserEnabled && laserPoints.Count > 1)
{
for (int i = 0; i < laserPoints.Count - 1; i++)
{
Segment laserSegment = new(laserPoints[i], laserPoints[i + 1]);
laserSegment.Draw(4f, c);
CircleDrawing.DrawCircle(laserPoints[i + 1], Rng.Instance.RandF(6f, 12f), c, 12);
var laserPointCircle = new Circle(laserPoints[i + 1], Rng.Instance.RandF(6f, 12f));
laserPointCircle.Draw(c, 0.1f);
}

}
Expand Down Expand Up @@ -529,7 +536,8 @@ internal enum ShapeType { None = 0, Triangle = 1, Rect = 2, Poly = 3};
//Polygons testShapes = new();
//Rect clipRect = new();
//RectD clipperRect = new();

private static Polygon cutShapeBuffer = new();
private static FractureInfo fractureInfoBuffer = new();
private readonly InputAction iaModeChange;
private readonly InputAction iaAddShape;
private readonly InputAction iaCutShape;
Expand Down Expand Up @@ -658,36 +666,36 @@ protected override void OnUpdateExample(GameTime time, ScreenInfo game, ScreenIn
}
private void OnAsteroidFractured(Asteroid a, Vector2 point)
{
var cutShape = Polygon.Generate(point, Rng.Instance.RandI(6, 12), 35, 100);
if(cutShape != null) FractureAsteroid(a, cutShape);
cutShapeBuffer.Clear();
if (!Polygon.Generate(point, Rng.Instance.RandI(6, 12), 35, 100, cutShapeBuffer)) return;
if(cutShapeBuffer.Count > 0) FractureAsteroid(a, cutShapeBuffer);
}
private void FractureAsteroid(Asteroid a, Polygon cutShape)
{
RemoveAsteroid(a);
var asteroidShape = a.GetPolygon();
var color = a.GetColor();
var fracture = fractureHelper.Fracture(asteroidShape, cutShape);
fractureHelper.Fracture(asteroidShape, cutShape, fractureInfoBuffer);

foreach (var cutoutShape in fracture.Cutouts)
foreach (var cutoutShape in fractureInfoBuffer.Cutouts)
{
lastCutOuts.Add(new Cutout(cutoutShape));
}

var center = cutShape.GetCentroid();
foreach (var piece in fracture.Pieces)
foreach (var piece in fractureInfoBuffer.Pieces)
{
// Vector2 center = piece.GetCentroid();
AsteroidShard shard = new(piece, center, color);
SpawnArea?.AddGameObject(shard);
}
if (fracture.NewShapes.Count > 0)
if (fractureInfoBuffer.NewShapes.Count > 0)
{
foreach (var shape in fracture.NewShapes)
foreach (var shape in fractureInfoBuffer.NewShapes)
{
float shapeArea = shape.GetArea();
if (shapeArea > MinPieceArea)
{

var relativeInfo = shape.ToRelative();

Asteroid newAsteroid = new(relativeInfo.shape, relativeInfo.transform);
Expand Down Expand Up @@ -743,8 +751,7 @@ private void RegenerateShape()
}
private void GenerateTriangle()
{
var shape = Polygon.Generate(curPos, 3, curSize / 2, curSize);
if (shape != null) curShape = shape;
Polygon.Generate(curPos, 3, curSize / 2, curSize, curShape);
}
private void GenerateRect()
{
Expand All @@ -753,8 +760,7 @@ private void GenerateRect()
}
private void GeneratePoly()
{
var shape = Polygon.Generate(curPos, 16, curSize * 0.25f, curSize);
if(shape != null) curShape = shape;
Polygon.Generate(curPos, 16, curSize * 0.25f, curSize, curShape);
}
private void PolyModeStarted()
{
Expand All @@ -771,23 +777,6 @@ private void PolyModeEnded()
}
protected override void OnHandleInputExample(float dt, Vector2 mousePosGame, Vector2 mousePosGameUi, Vector2 mousePosUI)
{
//clipRect = new(mousePosGame, new Vector2(100, 300), new Vector2(0f, 1f));
//clipperRect = clipRect.ToClipperRect();
//if (IsKeyPressed(KeyboardKey.KEY_NINE))
//{
// Polygons newShapes = new Polygons();
// foreach (var shape in testShapes)
// {
// if (shape.OverlapShape(clipRect))
// {
// var result = SClipper.ClipRect(clipRect, shape, 2, false).ToPolygons(true);
// if (result.Count > 0) newShapes.AddRange(result);
// }
// else newShapes.Add(shape);
// }
// testShapes = newShapes;
//}

if (CollisionHandler == null) return;

var gamepad = Input.GamepadManager.LastUsedGamepad;
Expand Down Expand Up @@ -818,7 +807,6 @@ protected override void OnHandleInputExample(float dt, Vector2 mousePosGame, Vec
asteroid.Overlapped();
}
}


if (iaAddShape.State.Pressed) //add polygon (merge)
{
Expand All @@ -835,7 +823,12 @@ protected override void OnHandleInputExample(float dt, Vector2 mousePosGame, Vec

}
}
var finalShapes = ShapeClipper.UnionMany(curShape.ToPolygon(), polys, Clipper2Lib.FillRule.NonZero).ToPolygons(true);

Polygons finalShapes = new();
var curPoly = curShape.ToPolygon();
curPoly.ClipUnionMany(polys, finalShapes);
finalShapes.RemoveAllHoles();
// var finalShapes = curShape.ToPolygon().UnionMany(polys).ToPolygons(true);
if (finalShapes.Count > 0)
{
foreach (var f in finalShapes)
Expand Down Expand Up @@ -873,8 +866,8 @@ protected override void OnHandleInputExample(float dt, Vector2 mousePosGame, Vec
{
if (candidate is Asteroid asteroid)
{
allCutOuts.Add(cutShape);
FractureAsteroid(asteroid, cutShape);

}
}
if (allCutOuts.Count > 0)
Expand Down
16 changes: 12 additions & 4 deletions Examples/Scenes/ExampleScenes/BouncyCircles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using ShapeEngine.Core.GameDef;
using ShapeEngine.Core.Structs;
using ShapeEngine.Geometry.CircleDef;
using ShapeEngine.Geometry.PointsDef;
using ShapeEngine.Geometry.PolygonDef;
using ShapeEngine.Geometry.RectDef;
using ShapeEngine.Input;
Expand Down Expand Up @@ -52,7 +53,7 @@ public override void DrawGame(ScreenInfo game)
_ => Colors.Medium
};

CircleDrawing.DrawCircleFast(Transform.Position, Transform.ScaledSize.Width, color);
Transform.GetCircle().DrawFast(color);
}

public override void DrawGameUI(ScreenInfo gameUi)
Expand Down Expand Up @@ -89,13 +90,15 @@ public class BouncyCircles : ExampleScene
{
Rect boundaryRect;

private Polygon hull = new();

private InputAction iaAdd;
private InputAction iaToggleConvexHull;
private readonly InputActionTree inputActionTree;

private bool showConvexHull = false;
private readonly List<GameObject> circles = new(65536);
private readonly List<Vector2> circlePoints = new(65536);
private readonly Points circlePoints = new(65536);

public BouncyCircles()
{
Expand Down Expand Up @@ -180,8 +183,13 @@ protected override void OnDrawGameExample(ScreenInfo game)
{
circlePoints.Add(circ.Transform.Position);
}
var hull = Polygon.FindConvexHull(circlePoints);
hull?.DrawLines(4f, Colors.Special);

if (circlePoints.Count > 0)
{
hull.Clear();
circlePoints.FindConvexHull(hull);
hull.DrawLines(4f, Colors.Special);
}
}

}
Expand Down
7 changes: 5 additions & 2 deletions Examples/Scenes/ExampleScenes/CameraExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,11 @@ protected override void OnDrawGameExample(ScreenInfo game)

var c = Colors.Cold; // new ColorRgba(Color.CornflowerBlue);
float f = camera.ZoomFactor;
CircleDrawing.DrawCircle(camera.BasePosition, 8f * f, c);
CircleDrawing.DrawCircleLines(camera.BasePosition, 64 * f, 2f * f, c);
var circle = new Circle(camera.BasePosition, 8f * f);
circle.Draw(c, 0.2f);
circle = circle.SetRadius(64 * f);
circle.DrawLines(2f * f, c, 0.65f);

Segment hor = new(camera.BasePosition - new Vector2(3000 * f, 0), camera.BasePosition + new Vector2(3000 * f, 0));
hor.Draw(2f * f, c);
Segment ver = new(camera.BasePosition - new Vector2(0, 3000 * f), camera.BasePosition + new Vector2(0, 3000 * f));
Expand Down
9 changes: 6 additions & 3 deletions Examples/Scenes/ExampleScenes/CameraGroupFollowExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,13 @@ public void Draw()
var outlineColor = Selected ? outlineColorActive : outlineColorInactive;
var hullColor = Selected ? hullColorActive : hullColorInactive;
var cockpitColor = Selected ? cockpitColorActive : cockpitColorInactive;
CircleDrawing.DrawCircle(hull.Center - rightThruster * hull.Radius, hull.Radius / 6, outlineColor.ColorRgba, 12);
CircleDrawing.DrawCircle(hull.Center - leftThruster * hull.Radius, hull.Radius / 6, outlineColor.ColorRgba, 12);
var rightThrusterCircle = new Circle(hull.Center - rightThruster * hull.Radius, hull.Radius / 6);
var leftThrusterCircle = new Circle(hull.Center - leftThruster * hull.Radius, hull.Radius / 6);
rightThrusterCircle.Draw(outlineColor.ColorRgba, 0.25f);
leftThrusterCircle.Draw(outlineColor.ColorRgba, 0.25f);
hull.Draw(hullColor.ColorRgba);
CircleDrawing.DrawCircle(hull.Center + movementDir * hull.Radius * 0.66f, hull.Radius * 0.33f, cockpitColor.ColorRgba, 12);
var circle = new Circle(hull.Center + movementDir * hull.Radius * 0.66f, hull.Radius * 0.33f);
circle.Draw(cockpitColor.ColorRgba, 0.25f);

hull.DrawLines(4f, outlineColor.ColorRgba);

Expand Down
39 changes: 27 additions & 12 deletions Examples/Scenes/ExampleScenes/ControlNodeExampleScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,39 @@ public ControlNodeButton(string text, AnchorPoint anchor, Vector2 stretch)
this.InputFilter = InputFilter.All;
}

protected override bool GetPressedState()
protected override bool GetButtonPressedState()
{
if (!Selected) return false;
var acceptState = GameloopExamples.Instance.InputActionUIAccept.Consume(out _);
return acceptState is { Consumed: false, Pressed: true };

// if (!Selected) return false;
// return Raylib.IsKeyDown(KeyboardKey.Space);
//Always consumed for some reason...
// var acceptState = GameloopExamples.Instance.InputActionUIAccept.Consume(out _);
// return acceptState is { Consumed: false, Pressed: true };
return GameloopExamples.Instance.InputActionUIAccept.State.Pressed;
}

protected override bool GetMousePressedState()
protected override bool GetMouseButtonPressedState()
{
if (!MouseInside) return false;
var acceptState = GameloopExamples.Instance.InputActionUIAcceptMouse.Consume(out _);
return acceptState is { Consumed: false, Pressed: true };

// if (!MouseInside) return false;
// return Raylib.IsMouseButtonDown(MouseButton.Left);
//Always consumed for some reason...
// var acceptState = GameloopExamples.Instance.InputActionUIAcceptMouse.Consume(out _);
// return acceptState is { Consumed: false, Pressed: true };
return GameloopExamples.Instance.InputActionUIAcceptMouse.State.Pressed;
}
protected override bool GetButtonReleasedState()
{
if (!Selected) return false;
//Always consumed for some reason...
// var acceptState = GameloopExamples.Instance.InputActionUIAccept.Consume(out _);
// return acceptState is { Consumed: false, Released: true };
return GameloopExamples.Instance.InputActionUIAccept.State.Released;
}

protected override bool GetMouseButtonReleasedState()
{
if (!MouseInside) return false;
//Always consumed for some reason...
// var acceptState = GameloopExamples.Instance.InputActionUIAcceptMouse.Consume(out _);
// return acceptState is { Consumed: false, Released: true };
return GameloopExamples.Instance.InputActionUIAcceptMouse.State.Released;
}

public override Direction GetNavigationDirection()
Expand Down
8 changes: 5 additions & 3 deletions Examples/Scenes/ExampleScenes/DataExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public void Draw()
var startC = Colors.Warm;
var endC = Colors.Medium.SetAlpha(150);
var c = startC.Lerp(endC, f);
CircleDrawing.DrawCircle(pos, ShapeMath.LerpFloat(size * 0.5f, size, f), c, 24);
var r = ShapeMath.LerpFloat(size * 0.5f, size, f);
var circle = new Circle(pos, r);
circle.Draw(c, 0.75f);
}
}
private class Planet
Expand Down Expand Up @@ -263,8 +265,8 @@ protected override void OnUpdateExample(GameTime time, ScreenInfo game, ScreenIn
}
protected override void OnDrawGameExample(ScreenInfo game)
{

CircleDrawing.DrawCircleLines(planet.Shape.Center, AsteroidSpawnRadius, 12f, Colors.Highlight, 4f);
var circle = new Circle(planet.Shape.Center, AsteroidSpawnRadius);
circle.DrawLines(12f, Colors.Highlight, 1f);

planet.Draw();
planet.DrawGameUI(textFont);
Expand Down
Loading
Loading