Skip to content

[Feature Request] Find the Polygon2D center, for Polygon rotations #60

@8BitAurum

Description

@8BitAurum

Is your feature request related to a problem? Please describe.
Currently, SypherEngine draws polygons by using the coordinates of al the points of the polygon in order. While there are methods to move the polygon after its been rendered, there isn't a way to rotate said polygons because of the forementioned way SypherEngine (and JavaFX) handles rendering of polygons

Describe the solution you'd like
The best solution I can think of is to write an algorithm in Polygon2D that uses all the points to get the visual center and the average center of the polygon (in separate methods ofcourse), so that it can be rotated with respect to those points as the origin

Describe alternatives you've considered
As far as I know, there isn't an alternative to this

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions