1 /* ---------------------------------------------------------------------------- 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 3.0.8 4 * 5 * Do not make changes to this file unless you know what you are doing--modify 6 * the SWIG interface file instead. 7 * ----------------------------------------------------------------------------- */ 8 9 package com.badlogic.gdx.physics.bullet.softbody; 10 11 import com.badlogic.gdx.physics.bullet.BulletBase; 12 import com.badlogic.gdx.physics.bullet.linearmath.*; 13 import com.badlogic.gdx.physics.bullet.collision.*; 14 import com.badlogic.gdx.physics.bullet.dynamics.*; 15 import com.badlogic.gdx.math.Vector3; 16 import com.badlogic.gdx.math.Quaternion; 17 import com.badlogic.gdx.math.Matrix3; 18 import com.badlogic.gdx.math.Matrix4; 19 20 public class btSparseSdf3 extends BulletBase { 21 private long swigCPtr; 22 23 protected btSparseSdf3(final String className, long cPtr, boolean cMemoryOwn) { 24 super(className, cPtr, cMemoryOwn); 25 swigCPtr = cPtr; 26 } 27 28 /** Construct a new btSparseSdf3, normally you should not need this constructor it's intended for low-level usage. */ 29 public btSparseSdf3(long cPtr, boolean cMemoryOwn) { 30 this("btSparseSdf3", cPtr, cMemoryOwn); 31 construct(); 32 } 33 34 @Override 35 protected void reset(long cPtr, boolean cMemoryOwn) { 36 if (!destroyed) 37 destroy(); 38 super.reset(swigCPtr = cPtr, cMemoryOwn); 39 } 40 41 public static long getCPtr(btSparseSdf3 obj) { 42 return (obj == null) ? 0 : obj.swigCPtr; 43 } 44 45 @Override 46 protected void finalize() throws Throwable { 47 if (!destroyed) 48 destroy(); 49 super.finalize(); 50 } 51 52 @Override protected synchronized void delete() { 53 if (swigCPtr != 0) { 54 if (swigCMemOwn) { 55 swigCMemOwn = false; 56 SoftbodyJNI.delete_btSparseSdf3(swigCPtr); 57 } 58 swigCPtr = 0; 59 } 60 super.delete(); 61 } 62 63 static public class IntFrac extends BulletBase { 64 private long swigCPtr; 65 66 protected IntFrac(final String className, long cPtr, boolean cMemoryOwn) { 67 super(className, cPtr, cMemoryOwn); 68 swigCPtr = cPtr; 69 } 70 71 /** Construct a new IntFrac, normally you should not need this constructor it's intended for low-level usage. */ 72 public IntFrac(long cPtr, boolean cMemoryOwn) { 73 this("IntFrac", cPtr, cMemoryOwn); 74 construct(); 75 } 76 77 @Override 78 protected void reset(long cPtr, boolean cMemoryOwn) { 79 if (!destroyed) 80 destroy(); 81 super.reset(swigCPtr = cPtr, cMemoryOwn); 82 } 83 84 public static long getCPtr(IntFrac obj) { 85 return (obj == null) ? 0 : obj.swigCPtr; 86 } 87 88 @Override 89 protected void finalize() throws Throwable { 90 if (!destroyed) 91 destroy(); 92 super.finalize(); 93 } 94 95 @Override protected synchronized void delete() { 96 if (swigCPtr != 0) { 97 if (swigCMemOwn) { 98 swigCMemOwn = false; 99 SoftbodyJNI.delete_btSparseSdf3_IntFrac(swigCPtr); 100 } 101 swigCPtr = 0; 102 } 103 super.delete(); 104 } 105 106 public void setB(int value) { 107 SoftbodyJNI.btSparseSdf3_IntFrac_b_set(swigCPtr, this, value); 108 } 109 110 public int getB() { 111 return SoftbodyJNI.btSparseSdf3_IntFrac_b_get(swigCPtr, this); 112 } 113 114 public void setI(int value) { 115 SoftbodyJNI.btSparseSdf3_IntFrac_i_set(swigCPtr, this, value); 116 } 117 118 public int getI() { 119 return SoftbodyJNI.btSparseSdf3_IntFrac_i_get(swigCPtr, this); 120 } 121 122 public void setF(float value) { 123 SoftbodyJNI.btSparseSdf3_IntFrac_f_set(swigCPtr, this, value); 124 } 125 126 public float getF() { 127 return SoftbodyJNI.btSparseSdf3_IntFrac_f_get(swigCPtr, this); 128 } 129 130 public IntFrac() { 131 this(SoftbodyJNI.new_btSparseSdf3_IntFrac(), true); 132 } 133 134 } 135 136 static public class Cell extends BulletBase { 137 private long swigCPtr; 138 139 protected Cell(final String className, long cPtr, boolean cMemoryOwn) { 140 super(className, cPtr, cMemoryOwn); 141 swigCPtr = cPtr; 142 } 143 144 /** Construct a new Cell, normally you should not need this constructor it's intended for low-level usage. */ 145 public Cell(long cPtr, boolean cMemoryOwn) { 146 this("Cell", cPtr, cMemoryOwn); 147 construct(); 148 } 149 150 @Override 151 protected void reset(long cPtr, boolean cMemoryOwn) { 152 if (!destroyed) 153 destroy(); 154 super.reset(swigCPtr = cPtr, cMemoryOwn); 155 } 156 157 public static long getCPtr(Cell obj) { 158 return (obj == null) ? 0 : obj.swigCPtr; 159 } 160 161 @Override 162 protected void finalize() throws Throwable { 163 if (!destroyed) 164 destroy(); 165 super.finalize(); 166 } 167 168 @Override protected synchronized void delete() { 169 if (swigCPtr != 0) { 170 if (swigCMemOwn) { 171 swigCMemOwn = false; 172 SoftbodyJNI.delete_btSparseSdf3_Cell(swigCPtr); 173 } 174 swigCPtr = 0; 175 } 176 super.delete(); 177 } 178 179 public void setD(SWIGTYPE_p_a_3_1__a_3_1__float value) { 180 SoftbodyJNI.btSparseSdf3_Cell_d_set(swigCPtr, this, SWIGTYPE_p_a_3_1__a_3_1__float.getCPtr(value)); 181 } 182 183 public SWIGTYPE_p_a_3_1__a_3_1__float getD() { 184 long cPtr = SoftbodyJNI.btSparseSdf3_Cell_d_get(swigCPtr, this); 185 return (cPtr == 0) ? null : new SWIGTYPE_p_a_3_1__a_3_1__float(cPtr, false); 186 } 187 188 public void setC(int[] value) { 189 SoftbodyJNI.btSparseSdf3_Cell_c_set(swigCPtr, this, value); 190 } 191 192 public int[] getC() { 193 return SoftbodyJNI.btSparseSdf3_Cell_c_get(swigCPtr, this); 194 } 195 196 public void setPuid(int value) { 197 SoftbodyJNI.btSparseSdf3_Cell_puid_set(swigCPtr, this, value); 198 } 199 200 public int getPuid() { 201 return SoftbodyJNI.btSparseSdf3_Cell_puid_get(swigCPtr, this); 202 } 203 204 public void setHash(long value) { 205 SoftbodyJNI.btSparseSdf3_Cell_hash_set(swigCPtr, this, value); 206 } 207 208 public long getHash() { 209 return SoftbodyJNI.btSparseSdf3_Cell_hash_get(swigCPtr, this); 210 } 211 212 public void setPclient(btCollisionShape value) { 213 SoftbodyJNI.btSparseSdf3_Cell_pclient_set(swigCPtr, this, btCollisionShape.getCPtr(value), value); 214 } 215 216 public btCollisionShape getPclient() { 217 long cPtr = SoftbodyJNI.btSparseSdf3_Cell_pclient_get(swigCPtr, this); 218 return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false); 219 } 220 221 public void setNext(btSparseSdf3.Cell value) { 222 SoftbodyJNI.btSparseSdf3_Cell_next_set(swigCPtr, this, btSparseSdf3.Cell.getCPtr(value), value); 223 } 224 225 public btSparseSdf3.Cell getNext() { 226 long cPtr = SoftbodyJNI.btSparseSdf3_Cell_next_get(swigCPtr, this); 227 return (cPtr == 0) ? null : new btSparseSdf3.Cell(cPtr, false); 228 } 229 230 public Cell() { 231 this(SoftbodyJNI.new_btSparseSdf3_Cell(), true); 232 } 233 234 } 235 236 public void setCells(SWIGTYPE_p_btAlignedObjectArrayT_btSparseSdfT_3_t__Cell_p_t value) { 237 SoftbodyJNI.btSparseSdf3_cells_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btSparseSdfT_3_t__Cell_p_t.getCPtr(value)); 238 } 239 240 public SWIGTYPE_p_btAlignedObjectArrayT_btSparseSdfT_3_t__Cell_p_t getCells() { 241 long cPtr = SoftbodyJNI.btSparseSdf3_cells_get(swigCPtr, this); 242 return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btSparseSdfT_3_t__Cell_p_t(cPtr, false); 243 } 244 245 public void setVoxelsz(float value) { 246 SoftbodyJNI.btSparseSdf3_voxelsz_set(swigCPtr, this, value); 247 } 248 249 public float getVoxelsz() { 250 return SoftbodyJNI.btSparseSdf3_voxelsz_get(swigCPtr, this); 251 } 252 253 public void setPuid(int value) { 254 SoftbodyJNI.btSparseSdf3_puid_set(swigCPtr, this, value); 255 } 256 257 public int getPuid() { 258 return SoftbodyJNI.btSparseSdf3_puid_get(swigCPtr, this); 259 } 260 261 public void setNcells(int value) { 262 SoftbodyJNI.btSparseSdf3_ncells_set(swigCPtr, this, value); 263 } 264 265 public int getNcells() { 266 return SoftbodyJNI.btSparseSdf3_ncells_get(swigCPtr, this); 267 } 268 269 public void setClampCells(int value) { 270 SoftbodyJNI.btSparseSdf3_clampCells_set(swigCPtr, this, value); 271 } 272 273 public int getClampCells() { 274 return SoftbodyJNI.btSparseSdf3_clampCells_get(swigCPtr, this); 275 } 276 277 public void setNprobes(int value) { 278 SoftbodyJNI.btSparseSdf3_nprobes_set(swigCPtr, this, value); 279 } 280 281 public int getNprobes() { 282 return SoftbodyJNI.btSparseSdf3_nprobes_get(swigCPtr, this); 283 } 284 285 public void setNqueries(int value) { 286 SoftbodyJNI.btSparseSdf3_nqueries_set(swigCPtr, this, value); 287 } 288 289 public int getNqueries() { 290 return SoftbodyJNI.btSparseSdf3_nqueries_get(swigCPtr, this); 291 } 292 293 public void Initialize(int hashsize, int clampCells) { 294 SoftbodyJNI.btSparseSdf3_Initialize__SWIG_0(swigCPtr, this, hashsize, clampCells); 295 } 296 297 public void Initialize(int hashsize) { 298 SoftbodyJNI.btSparseSdf3_Initialize__SWIG_1(swigCPtr, this, hashsize); 299 } 300 301 public void Initialize() { 302 SoftbodyJNI.btSparseSdf3_Initialize__SWIG_2(swigCPtr, this); 303 } 304 305 public void Reset() { 306 SoftbodyJNI.btSparseSdf3_Reset(swigCPtr, this); 307 } 308 309 public void GarbageCollect(int lifetime) { 310 SoftbodyJNI.btSparseSdf3_GarbageCollect__SWIG_0(swigCPtr, this, lifetime); 311 } 312 313 public void GarbageCollect() { 314 SoftbodyJNI.btSparseSdf3_GarbageCollect__SWIG_1(swigCPtr, this); 315 } 316 317 public int RemoveReferences(btCollisionShape pcs) { 318 return SoftbodyJNI.btSparseSdf3_RemoveReferences(swigCPtr, this, btCollisionShape.getCPtr(pcs), pcs); 319 } 320 321 public float Evaluate(Vector3 x, btCollisionShape shape, Vector3 normal, float margin) { 322 return SoftbodyJNI.btSparseSdf3_Evaluate(swigCPtr, this, x, btCollisionShape.getCPtr(shape), shape, normal, margin); 323 } 324 325 public void BuildCell(btSparseSdf3.Cell c) { 326 SoftbodyJNI.btSparseSdf3_BuildCell(swigCPtr, this, btSparseSdf3.Cell.getCPtr(c), c); 327 } 328 329 public static float DistanceToShape(Vector3 x, btCollisionShape shape) { 330 return SoftbodyJNI.btSparseSdf3_DistanceToShape(x, btCollisionShape.getCPtr(shape), shape); 331 } 332 333 public static btSparseSdf3.IntFrac Decompose(float x) { 334 return new btSparseSdf3.IntFrac(SoftbodyJNI.btSparseSdf3_Decompose(x), true); 335 } 336 337 public static float Lerp(float a, float b, float t) { 338 return SoftbodyJNI.btSparseSdf3_Lerp(a, b, t); 339 } 340 341 public static long Hash(int x, int y, int z, btCollisionShape shape) { 342 return SoftbodyJNI.btSparseSdf3_Hash(x, y, z, btCollisionShape.getCPtr(shape), shape); 343 } 344 345 public btSparseSdf3() { 346 this(SoftbodyJNI.new_btSparseSdf3(), true); 347 } 348 349 } 350