I'm making some progress in my Vec2 optimization effort. The pyramid stress test demo is down from around 251000 Vec2 creations per frame to around 81000 (when the pyramid has finished building but hasn't gone to sleep yet), and there's still an awful lot left to do.
One problem I've run into is the SupportsGenericDistance interface:
Code:
public interface SupportsGenericDistance {
public Vec2 support(XForm xf, Vec2 v);
public Vec2 getFirstVertex(XForm xf);
}
I'd like to change the returned Vec2s into a destination parameter:
Code:
public interface SupportsGenericDistance {
public void support(Vec2 dest, XForm xf, Vec2 v);
public void getFirstVertex(Vec2 dest, XForm xf);
}
The problem is that (I think) that interface is a part of the public API that would be used by library users who are implementing their own Shapes. Should the JBox2D public API to be considered stable and unchangeable, or are modifications like that acceptable at the moment?
Thanks.