Add more functions to Geometry2D
class
#12727
dustdfg
started this conversation in
Engine Core
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First of all I am talking from perspective of user of
Geometry2D
from side of the actual game and not engine by itself. Is it necessary in any way? No at all...Geometry2D
allows to work with polygons but there is not "complete" set of functions. For example there is no dedicated function for determining if polygon is convex or there is a function to get convex hull from a set of points but there is no a way to get AABB for a set of points. These two functions are easily implemented by user (one of them as an ugly wrapper around existing function) but why not to have these functions included?There is also two functions
line_intersects_line
andsegment_intersects_segment
but there is noline_intersects_segment
which seems to me would be handy.There is a way to clip polylines with polygons and achieve in the end polylines but I didn't found a way to slice polygon with polylines and get separate polygones...
Note about 3D counterpart. It looks for me even more raw than 2D part because it seems like it lacks lots of functions though I am bad at 2D not to mention 3D so I likely misunderstand 3D
Beta Was this translation helpful? Give feedback.
All reactions