-1

I am trying to create a Polygon class in a scripting language and thought it would be easy to look in other languages like Java to find out how they handle stuff like "containsPoint(float x, float y)" and "intersectsWith(Polygon p)".

For containsPoint(), it wasn't really hard to copy that from Java, but when trying to read Area.intersect() (which is also what I need), I found that it uses AreaOp.calculate() to create the intersection area, but the code of that function is compiled and I can't see it.

enter image description here

Is it allowed to see the code and if so, where can I see it? Or are there other examples that I can use to find intersection area of Polygons/Areas?

Julien Vavasseur
  • 3,854
  • 1
  • 20
  • 29
Wietlol
  • 1
  • 1

1 Answers1

0

I could not find an open implementation of the method you had mentioned. So this is not really an answer.

However, I did find the following post, which I thought it could have helped you.

Compute the area of intersection between a circle and a triangle?

Cheers.

Community
  • 1
  • 1
Alp
  • 3,027
  • 1
  • 13
  • 28