/** Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each * edge. */ public void set (Vector2[] vertices) { float[] verts = new float[vertices.length * 2]; for (int i = 0, j = 0; i < vertices.length * 2; i += 2, j++) { verts[i] = vertices[j].x; verts[i + 1] = vertices[j].y; } jniSet(addr, verts, 0, verts.length); }
/** Copy vertices from the given float array. It is assumed the vertices are in x,y order and define a convex polygon. It is * assumed that the exterior is the the right of each edge. */ public void set (float[] vertices) { jniSet(addr, vertices, 0, vertices.length); }
/** Copy vertices from the given float array, taking into account the offset and length. It is assumed the vertices are in * x,y order and define a convex polygon. It is assumed that the exterior is the the right of each edge. */ public void set (float[] vertices, int offset, int len) { jniSet(addr, vertices, offset, len); }
/** Copy vertices from the given float array. It is assumed the vertices are in x,y order and define a convex polygon. It is * assumed that the exterior is the the right of each edge. */ public void set (float[] vertices) { jniSet(addr, vertices, 0, vertices.length); }
/** Copy vertices from the given float array, taking into account the offset and length. It is assumed the vertices are in * x,y order and define a convex polygon. It is assumed that the exterior is the the right of each edge. */ public void set (float[] vertices, int offset, int len) { jniSet(addr, vertices, offset, len); }
/** Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each * edge. */ public void set (Vector2[] vertices) { float[] verts = new float[vertices.length * 2]; for (int i = 0, j = 0; i < vertices.length * 2; i += 2, j++) { verts[i] = vertices[j].x; verts[i + 1] = vertices[j].y; } jniSet(addr, verts, 0, verts.length); }