1 /* ----------------------------------------------------------------------------
\r
2 * This file was automatically generated by SWIG (http://www.swig.org).
\r
5 * Do not make changes to this file unless you know what you are doing--modify
\r
6 * the SWIG interface file instead.
\r
7 * ----------------------------------------------------------------------------- */
\r
9 package com.badlogic.gdx.physics.bullet;
\r
11 import com.badlogic.gdx.math.Vector3;
\r
12 import com.badlogic.gdx.math.Quaternion;
\r
13 import com.badlogic.gdx.math.Matrix3;
\r
14 import com.badlogic.gdx.math.Matrix4;
\r
16 public class btSoftBodyHelpers extends BulletBase {
\r
17 private long swigCPtr;
\r
19 protected btSoftBodyHelpers(final String className, long cPtr, boolean cMemoryOwn) {
\r
20 super(className, cPtr, cMemoryOwn);
\r
24 protected btSoftBodyHelpers(long cPtr, boolean cMemoryOwn) {
\r
25 this("btSoftBodyHelpers", cPtr, cMemoryOwn);
\r
29 public static long getCPtr(btSoftBodyHelpers obj) {
\r
30 return (obj == null) ? 0 : obj.swigCPtr;
\r
34 protected void finalize() throws Throwable {
\r
40 @Override protected synchronized void delete() {
\r
41 if (swigCPtr != 0) {
\r
43 swigCMemOwn = false;
\r
44 gdxBulletJNI.delete_btSoftBodyHelpers(swigCPtr);
\r
51 public static void Draw(btSoftBody psb, btIDebugDraw idraw, int drawflags) {
\r
52 gdxBulletJNI.btSoftBodyHelpers_Draw__SWIG_0(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, drawflags);
\r
55 public static void Draw(btSoftBody psb, btIDebugDraw idraw) {
\r
56 gdxBulletJNI.btSoftBodyHelpers_Draw__SWIG_1(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw);
\r
59 public static void DrawInfos(btSoftBody psb, btIDebugDraw idraw, boolean masses, boolean areas, boolean stress) {
\r
60 gdxBulletJNI.btSoftBodyHelpers_DrawInfos(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, masses, areas, stress);
\r
63 public static void DrawNodeTree(btSoftBody psb, btIDebugDraw idraw, int mindepth, int maxdepth) {
\r
64 gdxBulletJNI.btSoftBodyHelpers_DrawNodeTree__SWIG_0(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, mindepth, maxdepth);
\r
67 public static void DrawNodeTree(btSoftBody psb, btIDebugDraw idraw, int mindepth) {
\r
68 gdxBulletJNI.btSoftBodyHelpers_DrawNodeTree__SWIG_1(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, mindepth);
\r
71 public static void DrawNodeTree(btSoftBody psb, btIDebugDraw idraw) {
\r
72 gdxBulletJNI.btSoftBodyHelpers_DrawNodeTree__SWIG_2(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw);
\r
75 public static void DrawFaceTree(btSoftBody psb, btIDebugDraw idraw, int mindepth, int maxdepth) {
\r
76 gdxBulletJNI.btSoftBodyHelpers_DrawFaceTree__SWIG_0(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, mindepth, maxdepth);
\r
79 public static void DrawFaceTree(btSoftBody psb, btIDebugDraw idraw, int mindepth) {
\r
80 gdxBulletJNI.btSoftBodyHelpers_DrawFaceTree__SWIG_1(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, mindepth);
\r
83 public static void DrawFaceTree(btSoftBody psb, btIDebugDraw idraw) {
\r
84 gdxBulletJNI.btSoftBodyHelpers_DrawFaceTree__SWIG_2(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw);
\r
87 public static void DrawClusterTree(btSoftBody psb, btIDebugDraw idraw, int mindepth, int maxdepth) {
\r
88 gdxBulletJNI.btSoftBodyHelpers_DrawClusterTree__SWIG_0(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, mindepth, maxdepth);
\r
91 public static void DrawClusterTree(btSoftBody psb, btIDebugDraw idraw, int mindepth) {
\r
92 gdxBulletJNI.btSoftBodyHelpers_DrawClusterTree__SWIG_1(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw, mindepth);
\r
95 public static void DrawClusterTree(btSoftBody psb, btIDebugDraw idraw) {
\r
96 gdxBulletJNI.btSoftBodyHelpers_DrawClusterTree__SWIG_2(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw);
\r
99 public static void DrawFrame(btSoftBody psb, btIDebugDraw idraw) {
\r
100 gdxBulletJNI.btSoftBodyHelpers_DrawFrame(btSoftBody.getCPtr(psb), psb, btIDebugDraw.getCPtr(idraw), idraw);
\r
103 public static btSoftBody CreateRope(btSoftBodyWorldInfo worldInfo, Vector3 from, Vector3 to, int res, int fixeds) {
\r
104 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreateRope(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, from, to, res, fixeds);
\r
105 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
108 public static btSoftBody CreatePatch(btSoftBodyWorldInfo worldInfo, Vector3 corner00, Vector3 corner10, Vector3 corner01, Vector3 corner11, int resx, int resy, int fixeds, boolean gendiags) {
\r
109 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreatePatch(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, corner00, corner10, corner01, corner11, resx, resy, fixeds, gendiags);
\r
110 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
113 public static btSoftBody CreatePatchUV(btSoftBodyWorldInfo worldInfo, Vector3 corner00, Vector3 corner10, Vector3 corner01, Vector3 corner11, int resx, int resy, int fixeds, boolean gendiags, java.nio.FloatBuffer tex_coords) {
\r
114 assert tex_coords.isDirect() : "Buffer must be allocated direct.";
\r
116 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreatePatchUV__SWIG_0(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, corner00, corner10, corner01, corner11, resx, resy, fixeds, gendiags, tex_coords);
\r
117 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
121 public static btSoftBody CreatePatchUV(btSoftBodyWorldInfo worldInfo, Vector3 corner00, Vector3 corner10, Vector3 corner01, Vector3 corner11, int resx, int resy, int fixeds, boolean gendiags) {
\r
122 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreatePatchUV__SWIG_1(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, corner00, corner10, corner01, corner11, resx, resy, fixeds, gendiags);
\r
123 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
126 public static float CalculateUV(int resx, int resy, int ix, int iy, int id) {
\r
127 return gdxBulletJNI.btSoftBodyHelpers_CalculateUV(resx, resy, ix, iy, id);
\r
130 public static btSoftBody CreateEllipsoid(btSoftBodyWorldInfo worldInfo, Vector3 center, Vector3 radius, int res) {
\r
131 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreateEllipsoid(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, center, radius, res);
\r
132 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
135 public static btSoftBody CreateFromTriMesh(btSoftBodyWorldInfo worldInfo, java.nio.FloatBuffer vertices, java.nio.IntBuffer triangles, int ntriangles, boolean randomizeConstraints) {
\r
136 assert vertices.isDirect() : "Buffer must be allocated direct.";
\r
137 assert triangles.isDirect() : "Buffer must be allocated direct.";
\r
139 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreateFromTriMesh__SWIG_0(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, vertices, triangles, ntriangles, randomizeConstraints);
\r
140 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
144 public static btSoftBody CreateFromTriMesh(btSoftBodyWorldInfo worldInfo, java.nio.FloatBuffer vertices, java.nio.IntBuffer triangles, int ntriangles) {
\r
145 assert vertices.isDirect() : "Buffer must be allocated direct.";
\r
146 assert triangles.isDirect() : "Buffer must be allocated direct.";
\r
148 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreateFromTriMesh__SWIG_1(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, vertices, triangles, ntriangles);
\r
149 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
153 public static btSoftBody CreateFromConvexHull(btSoftBodyWorldInfo worldInfo, btVector3 vertices, int nvertices, boolean randomizeConstraints) {
\r
154 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreateFromConvexHull__SWIG_0(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, btVector3.getCPtr(vertices), vertices, nvertices, randomizeConstraints);
\r
155 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
158 public static btSoftBody CreateFromConvexHull(btSoftBodyWorldInfo worldInfo, btVector3 vertices, int nvertices) {
\r
159 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreateFromConvexHull__SWIG_1(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, btVector3.getCPtr(vertices), vertices, nvertices);
\r
160 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
163 public static btSoftBody CreateFromTetGenData(btSoftBodyWorldInfo worldInfo, String ele, String face, String node, boolean bfacelinks, boolean btetralinks, boolean bfacesfromtetras) {
\r
164 long cPtr = gdxBulletJNI.btSoftBodyHelpers_CreateFromTetGenData(btSoftBodyWorldInfo.getCPtr(worldInfo), worldInfo, ele, face, node, bfacelinks, btetralinks, bfacesfromtetras);
\r
165 return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
\r
168 public btSoftBodyHelpers() {
\r
169 this(gdxBulletJNI.new_btSoftBodyHelpers(), true);
\r