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 btSoftBodyCollisionShape extends btConcaveShape {
     21 	private long swigCPtr;
     22 
     23 	protected btSoftBodyCollisionShape(final String className, long cPtr, boolean cMemoryOwn) {
     24 		super(className, SoftbodyJNI.btSoftBodyCollisionShape_SWIGUpcast(cPtr), cMemoryOwn);
     25 		swigCPtr = cPtr;
     26 	}
     27 
     28 	/** Construct a new btSoftBodyCollisionShape, normally you should not need this constructor it's intended for low-level usage. */
     29 	public btSoftBodyCollisionShape(long cPtr, boolean cMemoryOwn) {
     30 		this("btSoftBodyCollisionShape", cPtr, cMemoryOwn);
     31 		construct();
     32 	}
     33 
     34 	@Override
     35 	protected void reset(long cPtr, boolean cMemoryOwn) {
     36 		if (!destroyed)
     37 			destroy();
     38 		super.reset(SoftbodyJNI.btSoftBodyCollisionShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
     39 	}
     40 
     41 	public static long getCPtr(btSoftBodyCollisionShape 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_btSoftBodyCollisionShape(swigCPtr);
     57 			}
     58 			swigCPtr = 0;
     59 		}
     60 		super.delete();
     61 	}
     62 
     63   public void setBody(btSoftBody value) {
     64     SoftbodyJNI.btSoftBodyCollisionShape_body_set(swigCPtr, this, btSoftBody.getCPtr(value), value);
     65   }
     66 
     67   public btSoftBody getBody() {
     68     long cPtr = SoftbodyJNI.btSoftBodyCollisionShape_body_get(swigCPtr, this);
     69     return (cPtr == 0) ? null : new btSoftBody(cPtr, false);
     70   }
     71 
     72   public btSoftBodyCollisionShape(btSoftBody backptr) {
     73     this(SoftbodyJNI.new_btSoftBodyCollisionShape(btSoftBody.getCPtr(backptr), backptr), true);
     74   }
     75 
     76 }
     77