What’s your opinion of such 2D geometry libraries as Java Topology Suite, JavaGeom, and GeoRegression for performance-oriented games?
Which one performed the best for you?
Years ago, I made a floating point Polygon class that wraps Path2D. I made methods similar to those in java.awt.Polygon. I’m mostly happy with it, but the profiler tells me it ain’t that fast, even though I use the Separating Axis Theorem and fail-fast bounding box checks for intersects(), and object pooling to a fair extent. I suspect Java standard library object methods perform heap allocations liberally under the covers, but I haven’t had time to investigate if this is true.
Is using standard Java library objects for geometry processing the worst choice for performance?