Home | History | Annotate | Download | only in softbody
      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 btSoftColliders extends BulletBase {
     21 	private long swigCPtr;
     22 
     23 	protected btSoftColliders(final String className, long cPtr, boolean cMemoryOwn) {
     24 		super(className, cPtr, cMemoryOwn);
     25 		swigCPtr = cPtr;
     26 	}
     27 
     28 	/** Construct a new btSoftColliders, normally you should not need this constructor it's intended for low-level usage. */
     29 	public btSoftColliders(long cPtr, boolean cMemoryOwn) {
     30 		this("btSoftColliders", 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(btSoftColliders 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_btSoftColliders(swigCPtr);
     57 			}
     58 			swigCPtr = 0;
     59 		}
     60 		super.delete();
     61 	}
     62 
     63   static public class ClusterBase extends ICollide {
     64   	private long swigCPtr;
     65 
     66   	protected ClusterBase(final String className, long cPtr, boolean cMemoryOwn) {
     67   		super(className, SoftbodyJNI.btSoftColliders_ClusterBase_SWIGUpcast(cPtr), cMemoryOwn);
     68   		swigCPtr = cPtr;
     69   	}
     70 
     71   	/** Construct a new ClusterBase, normally you should not need this constructor it's intended for low-level usage. */
     72   	public ClusterBase(long cPtr, boolean cMemoryOwn) {
     73   		this("ClusterBase", cPtr, cMemoryOwn);
     74   		construct();
     75   	}
     76 
     77   	@Override
     78   	protected void reset(long cPtr, boolean cMemoryOwn) {
     79   		if (!destroyed)
     80   			destroy();
     81   		super.reset(SoftbodyJNI.btSoftColliders_ClusterBase_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
     82   	}
     83 
     84   	public static long getCPtr(ClusterBase 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_btSoftColliders_ClusterBase(swigCPtr);
    100   			}
    101   			swigCPtr = 0;
    102   		}
    103   		super.delete();
    104   	}
    105 
    106     public void setErp(float value) {
    107       SoftbodyJNI.btSoftColliders_ClusterBase_erp_set(swigCPtr, this, value);
    108     }
    109 
    110     public float getErp() {
    111       return SoftbodyJNI.btSoftColliders_ClusterBase_erp_get(swigCPtr, this);
    112     }
    113 
    114     public void setIdt(float value) {
    115       SoftbodyJNI.btSoftColliders_ClusterBase_idt_set(swigCPtr, this, value);
    116     }
    117 
    118     public float getIdt() {
    119       return SoftbodyJNI.btSoftColliders_ClusterBase_idt_get(swigCPtr, this);
    120     }
    121 
    122     public void setMargin(float value) {
    123       SoftbodyJNI.btSoftColliders_ClusterBase_margin_set(swigCPtr, this, value);
    124     }
    125 
    126     public float getMargin() {
    127       return SoftbodyJNI.btSoftColliders_ClusterBase_margin_get(swigCPtr, this);
    128     }
    129 
    130     public void setFriction(float value) {
    131       SoftbodyJNI.btSoftColliders_ClusterBase_friction_set(swigCPtr, this, value);
    132     }
    133 
    134     public float getFriction() {
    135       return SoftbodyJNI.btSoftColliders_ClusterBase_friction_get(swigCPtr, this);
    136     }
    137 
    138     public void setThreshold(float value) {
    139       SoftbodyJNI.btSoftColliders_ClusterBase_threshold_set(swigCPtr, this, value);
    140     }
    141 
    142     public float getThreshold() {
    143       return SoftbodyJNI.btSoftColliders_ClusterBase_threshold_get(swigCPtr, this);
    144     }
    145 
    146     public ClusterBase() {
    147       this(SoftbodyJNI.new_btSoftColliders_ClusterBase(), true);
    148     }
    149 
    150     public boolean SolveContact(btGjkEpaSolver2.sResults res, btSoftBody.Body ba, btSoftBody.Body bb, btSoftBody.CJoint joint) {
    151       return SoftbodyJNI.btSoftColliders_ClusterBase_SolveContact(swigCPtr, this, btGjkEpaSolver2.sResults.getCPtr(res), res, btSoftBody.Body.getCPtr(ba), ba, btSoftBody.Body.getCPtr(bb), bb, btSoftBody.CJoint.getCPtr(joint), joint);
    152     }
    153 
    154   }
    155 
    156   static public class CollideCL_RS extends btSoftColliders.ClusterBase {
    157   	private long swigCPtr;
    158 
    159   	protected CollideCL_RS(final String className, long cPtr, boolean cMemoryOwn) {
    160   		super(className, SoftbodyJNI.btSoftColliders_CollideCL_RS_SWIGUpcast(cPtr), cMemoryOwn);
    161   		swigCPtr = cPtr;
    162   	}
    163 
    164   	/** Construct a new CollideCL_RS, normally you should not need this constructor it's intended for low-level usage. */
    165   	public CollideCL_RS(long cPtr, boolean cMemoryOwn) {
    166   		this("CollideCL_RS", cPtr, cMemoryOwn);
    167   		construct();
    168   	}
    169 
    170   	@Override
    171   	protected void reset(long cPtr, boolean cMemoryOwn) {
    172   		if (!destroyed)
    173   			destroy();
    174   		super.reset(SoftbodyJNI.btSoftColliders_CollideCL_RS_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
    175   	}
    176 
    177   	public static long getCPtr(CollideCL_RS obj) {
    178   		return (obj == null) ? 0 : obj.swigCPtr;
    179   	}
    180 
    181   	@Override
    182   	protected void finalize() throws Throwable {
    183   		if (!destroyed)
    184   			destroy();
    185   		super.finalize();
    186   	}
    187 
    188     @Override protected synchronized void delete() {
    189   		if (swigCPtr != 0) {
    190   			if (swigCMemOwn) {
    191   				swigCMemOwn = false;
    192   				SoftbodyJNI.delete_btSoftColliders_CollideCL_RS(swigCPtr);
    193   			}
    194   			swigCPtr = 0;
    195   		}
    196   		super.delete();
    197   	}
    198 
    199     public void setPsb(btSoftBody value) {
    200       SoftbodyJNI.btSoftColliders_CollideCL_RS_psb_set(swigCPtr, this, btSoftBody.getCPtr(value), value);
    201     }
    202 
    203     public btSoftBody getPsb() {
    204       long cPtr = SoftbodyJNI.btSoftColliders_CollideCL_RS_psb_get(swigCPtr, this);
    205       return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
    206     }
    207 
    208     public void setColObjWrap(btCollisionObjectWrapper value) {
    209       SoftbodyJNI.btSoftColliders_CollideCL_RS_colObjWrap_set(swigCPtr, this, btCollisionObjectWrapper.getCPtr(value), value);
    210     }
    211 
    212     public btCollisionObjectWrapper getColObjWrap() {
    213   	return btCollisionObjectWrapper.internalTemp(SoftbodyJNI.btSoftColliders_CollideCL_RS_colObjWrap_get(swigCPtr, this), false);
    214   }
    215 
    216     public void ProcessColObj(btSoftBody ps, btCollisionObjectWrapper colObWrap) {
    217       SoftbodyJNI.btSoftColliders_CollideCL_RS_ProcessColObj(swigCPtr, this, btSoftBody.getCPtr(ps), ps, btCollisionObjectWrapper.getCPtr(colObWrap), colObWrap);
    218     }
    219 
    220     public CollideCL_RS() {
    221       this(SoftbodyJNI.new_btSoftColliders_CollideCL_RS(), true);
    222     }
    223 
    224   }
    225 
    226   static public class CollideCL_SS extends btSoftColliders.ClusterBase {
    227   	private long swigCPtr;
    228 
    229   	protected CollideCL_SS(final String className, long cPtr, boolean cMemoryOwn) {
    230   		super(className, SoftbodyJNI.btSoftColliders_CollideCL_SS_SWIGUpcast(cPtr), cMemoryOwn);
    231   		swigCPtr = cPtr;
    232   	}
    233 
    234   	/** Construct a new CollideCL_SS, normally you should not need this constructor it's intended for low-level usage. */
    235   	public CollideCL_SS(long cPtr, boolean cMemoryOwn) {
    236   		this("CollideCL_SS", cPtr, cMemoryOwn);
    237   		construct();
    238   	}
    239 
    240   	@Override
    241   	protected void reset(long cPtr, boolean cMemoryOwn) {
    242   		if (!destroyed)
    243   			destroy();
    244   		super.reset(SoftbodyJNI.btSoftColliders_CollideCL_SS_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
    245   	}
    246 
    247   	public static long getCPtr(CollideCL_SS obj) {
    248   		return (obj == null) ? 0 : obj.swigCPtr;
    249   	}
    250 
    251   	@Override
    252   	protected void finalize() throws Throwable {
    253   		if (!destroyed)
    254   			destroy();
    255   		super.finalize();
    256   	}
    257 
    258     @Override protected synchronized void delete() {
    259   		if (swigCPtr != 0) {
    260   			if (swigCMemOwn) {
    261   				swigCMemOwn = false;
    262   				SoftbodyJNI.delete_btSoftColliders_CollideCL_SS(swigCPtr);
    263   			}
    264   			swigCPtr = 0;
    265   		}
    266   		super.delete();
    267   	}
    268 
    269     public void setBodies(SWIGTYPE_p_p_btSoftBody value) {
    270       SoftbodyJNI.btSoftColliders_CollideCL_SS_bodies_set(swigCPtr, this, SWIGTYPE_p_p_btSoftBody.getCPtr(value));
    271     }
    272 
    273     public SWIGTYPE_p_p_btSoftBody getBodies() {
    274       long cPtr = SoftbodyJNI.btSoftColliders_CollideCL_SS_bodies_get(swigCPtr, this);
    275       return (cPtr == 0) ? null : new SWIGTYPE_p_p_btSoftBody(cPtr, false);
    276     }
    277 
    278     public void ProcessSoftSoft(btSoftBody psa, btSoftBody psb) {
    279       SoftbodyJNI.btSoftColliders_CollideCL_SS_ProcessSoftSoft(swigCPtr, this, btSoftBody.getCPtr(psa), psa, btSoftBody.getCPtr(psb), psb);
    280     }
    281 
    282     public CollideCL_SS() {
    283       this(SoftbodyJNI.new_btSoftColliders_CollideCL_SS(), true);
    284     }
    285 
    286   }
    287 
    288   static public class CollideSDF_RS extends ICollide {
    289   	private long swigCPtr;
    290 
    291   	protected CollideSDF_RS(final String className, long cPtr, boolean cMemoryOwn) {
    292   		super(className, SoftbodyJNI.btSoftColliders_CollideSDF_RS_SWIGUpcast(cPtr), cMemoryOwn);
    293   		swigCPtr = cPtr;
    294   	}
    295 
    296   	/** Construct a new CollideSDF_RS, normally you should not need this constructor it's intended for low-level usage. */
    297   	public CollideSDF_RS(long cPtr, boolean cMemoryOwn) {
    298   		this("CollideSDF_RS", cPtr, cMemoryOwn);
    299   		construct();
    300   	}
    301 
    302   	@Override
    303   	protected void reset(long cPtr, boolean cMemoryOwn) {
    304   		if (!destroyed)
    305   			destroy();
    306   		super.reset(SoftbodyJNI.btSoftColliders_CollideSDF_RS_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
    307   	}
    308 
    309   	public static long getCPtr(CollideSDF_RS obj) {
    310   		return (obj == null) ? 0 : obj.swigCPtr;
    311   	}
    312 
    313   	@Override
    314   	protected void finalize() throws Throwable {
    315   		if (!destroyed)
    316   			destroy();
    317   		super.finalize();
    318   	}
    319 
    320     @Override protected synchronized void delete() {
    321   		if (swigCPtr != 0) {
    322   			if (swigCMemOwn) {
    323   				swigCMemOwn = false;
    324   				SoftbodyJNI.delete_btSoftColliders_CollideSDF_RS(swigCPtr);
    325   			}
    326   			swigCPtr = 0;
    327   		}
    328   		super.delete();
    329   	}
    330 
    331     public void DoNode(btSoftBody.Node n) {
    332       SoftbodyJNI.btSoftColliders_CollideSDF_RS_DoNode(swigCPtr, this, btSoftBody.Node.getCPtr(n), n);
    333     }
    334 
    335     public void setPsb(btSoftBody value) {
    336       SoftbodyJNI.btSoftColliders_CollideSDF_RS_psb_set(swigCPtr, this, btSoftBody.getCPtr(value), value);
    337     }
    338 
    339     public btSoftBody getPsb() {
    340       long cPtr = SoftbodyJNI.btSoftColliders_CollideSDF_RS_psb_get(swigCPtr, this);
    341       return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
    342     }
    343 
    344     public void setColObj1Wrap(btCollisionObjectWrapper value) {
    345       SoftbodyJNI.btSoftColliders_CollideSDF_RS_colObj1Wrap_set(swigCPtr, this, btCollisionObjectWrapper.getCPtr(value), value);
    346     }
    347 
    348     public btCollisionObjectWrapper getColObj1Wrap() {
    349   	return btCollisionObjectWrapper.internalTemp(SoftbodyJNI.btSoftColliders_CollideSDF_RS_colObj1Wrap_get(swigCPtr, this), false);
    350   }
    351 
    352     public void setRigidBody(btRigidBody value) {
    353       SoftbodyJNI.btSoftColliders_CollideSDF_RS_rigidBody_set(swigCPtr, this, btRigidBody.getCPtr(value), value);
    354     }
    355 
    356     public btRigidBody getRigidBody() {
    357   	return btRigidBody.getInstance(SoftbodyJNI.btSoftColliders_CollideSDF_RS_rigidBody_get(swigCPtr, this), false);
    358   }
    359 
    360     public void setDynmargin(float value) {
    361       SoftbodyJNI.btSoftColliders_CollideSDF_RS_dynmargin_set(swigCPtr, this, value);
    362     }
    363 
    364     public float getDynmargin() {
    365       return SoftbodyJNI.btSoftColliders_CollideSDF_RS_dynmargin_get(swigCPtr, this);
    366     }
    367 
    368     public void setStamargin(float value) {
    369       SoftbodyJNI.btSoftColliders_CollideSDF_RS_stamargin_set(swigCPtr, this, value);
    370     }
    371 
    372     public float getStamargin() {
    373       return SoftbodyJNI.btSoftColliders_CollideSDF_RS_stamargin_get(swigCPtr, this);
    374     }
    375 
    376     public CollideSDF_RS() {
    377       this(SoftbodyJNI.new_btSoftColliders_CollideSDF_RS(), true);
    378     }
    379 
    380   }
    381 
    382   static public class CollideVF_SS extends ICollide {
    383   	private long swigCPtr;
    384 
    385   	protected CollideVF_SS(final String className, long cPtr, boolean cMemoryOwn) {
    386   		super(className, SoftbodyJNI.btSoftColliders_CollideVF_SS_SWIGUpcast(cPtr), cMemoryOwn);
    387   		swigCPtr = cPtr;
    388   	}
    389 
    390   	/** Construct a new CollideVF_SS, normally you should not need this constructor it's intended for low-level usage. */
    391   	public CollideVF_SS(long cPtr, boolean cMemoryOwn) {
    392   		this("CollideVF_SS", cPtr, cMemoryOwn);
    393   		construct();
    394   	}
    395 
    396   	@Override
    397   	protected void reset(long cPtr, boolean cMemoryOwn) {
    398   		if (!destroyed)
    399   			destroy();
    400   		super.reset(SoftbodyJNI.btSoftColliders_CollideVF_SS_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
    401   	}
    402 
    403   	public static long getCPtr(CollideVF_SS obj) {
    404   		return (obj == null) ? 0 : obj.swigCPtr;
    405   	}
    406 
    407   	@Override
    408   	protected void finalize() throws Throwable {
    409   		if (!destroyed)
    410   			destroy();
    411   		super.finalize();
    412   	}
    413 
    414     @Override protected synchronized void delete() {
    415   		if (swigCPtr != 0) {
    416   			if (swigCMemOwn) {
    417   				swigCMemOwn = false;
    418   				SoftbodyJNI.delete_btSoftColliders_CollideVF_SS(swigCPtr);
    419   			}
    420   			swigCPtr = 0;
    421   		}
    422   		super.delete();
    423   	}
    424 
    425     public void setPsb(SWIGTYPE_p_p_btSoftBody value) {
    426       SoftbodyJNI.btSoftColliders_CollideVF_SS_psb_set(swigCPtr, this, SWIGTYPE_p_p_btSoftBody.getCPtr(value));
    427     }
    428 
    429     public SWIGTYPE_p_p_btSoftBody getPsb() {
    430       long cPtr = SoftbodyJNI.btSoftColliders_CollideVF_SS_psb_get(swigCPtr, this);
    431       return (cPtr == 0) ? null : new SWIGTYPE_p_p_btSoftBody(cPtr, false);
    432     }
    433 
    434     public void setMrg(float value) {
    435       SoftbodyJNI.btSoftColliders_CollideVF_SS_mrg_set(swigCPtr, this, value);
    436     }
    437 
    438     public float getMrg() {
    439       return SoftbodyJNI.btSoftColliders_CollideVF_SS_mrg_get(swigCPtr, this);
    440     }
    441 
    442     public CollideVF_SS() {
    443       this(SoftbodyJNI.new_btSoftColliders_CollideVF_SS(), true);
    444     }
    445 
    446   }
    447 
    448   public btSoftColliders() {
    449     this(SoftbodyJNI.new_btSoftColliders(), true);
    450   }
    451 
    452 }
    453