The static transform is slower than it needs to be. I was running the profiler and noticed a ton of objects being created.
I changed translate already to this:
public static void translate( GeomContainer src, float offsetX, float offsetY, float offsetZ )
{
//final Point3f[] vertices = GeometryUtils.getVertexCoords( src );
Point3f pt = new Point3f();
for(int i=0; i<src.getVertexCount(); i++)
{
src.getCoordinate(i, pt);
pt.addX( offsetX );
pt.addY( offsetY );
pt.addZ( offsetZ );
src.setCoordinate(i, pt);
}
//translate( vertices, offsetX, offsetY, offsetZ );
//src.setCoordinates( 0, vertices );
}
It took it from something like 900ms to < 50ms (for however many times I'm calling it).
final Point3f[] vertices = GeometryUtils.getVertexCoords( src );
creates an array and allocates a Point3f for each point in the GeomContainer.