Improve code / xml formatting, #54

This commit is contained in:
Emux 2016-07-12 19:25:33 +03:00
parent e793e8851b
commit 43ca550832
133 changed files with 2803 additions and 2791 deletions

View File

@ -6,7 +6,7 @@ import com.badlogic.gdx.jnigen.NativeCodeGenerator;
public class JniBuilder {
public static void main(String[] args) throws Exception {
String[] headers = { ".", "libtess2/Include" };
String[] headers = {".", "libtess2/Include"};
String[] sources = {
"gl/utils.c",
"libtess2/Source/bucketalloc.c",

View File

@ -148,9 +148,11 @@ public class TessJNI {
//ma.extraVertices = 256;
return (long)tessNewTess(&ma);
} */
static native void freeTess(long inst); /* {
tessDeleteTess((TESStesselator*) inst);
} */
/**
* Adds a contour to be tesselated.
* The type of the vertex coordinates is assumed to be TESSreal.
@ -164,6 +166,7 @@ public class TessJNI {
static native void addContour(long inst, int size, float[] contour, int stride, int offset, int count);/* {
tessAddContour((TESStesselator*) inst, size, contour + (offset * stride), stride, count);
} */
static native void addMultiContour2D(long inst, int[] index, float[] contour, int idxStart, int idxCount);/* {
TESStesselator* tess = (TESStesselator*) inst;
int offset = 0;
@ -180,6 +183,7 @@ public class TessJNI {
offset += len;
}
} */
/**
* Tesselate contours.
*
@ -194,9 +198,11 @@ public class TessJNI {
static native int tessContour2D(long inst, int windingRule, int elementType, int polySize, int vertexSize);/*{
return tessTesselate((TESStesselator*) inst, windingRule, elementType, polySize, vertexSize, 0);
} */
static native int getVertexCount(long inst); /*{
return tessGetVertexCount((TESStesselator*) inst);
}*/
/**
* Returns pointer to first coordinate of first vertex.
*/
@ -207,6 +213,7 @@ public class TessJNI {
memcpy(out, vertices + offset, length * sizeof(TESSreal));
return 1;
}*/
/**
* Returns pointer to first coordinate of first vertex.
*/
@ -215,9 +222,10 @@ public class TessJNI {
for(int i = 0; i < length; i++)
out[i] = (short)(vertices[offset++] * scale + 0.5f);
}*/
/**
* Returns pointer to first vertex index.
*
* <p/>
* Vertex indices can be used to map the generated vertices to the original vertices.
* Every point added using tessAddContour() will get a new index starting at 0.
* New vertices generated at the intersections of segments are assigned value TESS_UNDEF.
@ -229,12 +237,14 @@ public class TessJNI {
memcpy(out, indices + offset, length * sizeof(TESSindex));
return 1;
} */
/**
* Returns number of elements in the the tesselated output.
*/
static native int getElementCount(long inst);/*{
return tessGetElementCount((TESStesselator*) inst);
}*/
/**
* Returns pointer to the first element.
*/
@ -245,6 +255,7 @@ public class TessJNI {
memcpy(out, elements + offset, length * sizeof(TESSindex));
return 1;
}*/
/**
* Returns pointer to the first element.
*/
@ -253,6 +264,7 @@ public class TessJNI {
for(int i = 0; i < length; i++)
out[i] = (short)elements[offset++];
}*/
/**
* Returns list of triangles indices (or to the first element of convex polygons).
*/