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.collision; 10 11 import com.badlogic.gdx.physics.bullet.BulletBase; 12 import com.badlogic.gdx.physics.bullet.linearmath.*; 13 import com.badlogic.gdx.math.Vector3; 14 import com.badlogic.gdx.math.Quaternion; 15 import com.badlogic.gdx.math.Matrix3; 16 import com.badlogic.gdx.math.Matrix4; 17 18 public class btBroadphasePair extends BulletBase { 19 private long swigCPtr; 20 btBroadphasePair(final String className, long cPtr, boolean cMemoryOwn)21 protected btBroadphasePair(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, cPtr, cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new btBroadphasePair, normally you should not need this constructor it's intended for low-level usage. */ btBroadphasePair(long cPtr, boolean cMemoryOwn)27 public btBroadphasePair(long cPtr, boolean cMemoryOwn) { 28 this("btBroadphasePair", cPtr, cMemoryOwn); 29 construct(); 30 } 31 32 @Override reset(long cPtr, boolean cMemoryOwn)33 protected void reset(long cPtr, boolean cMemoryOwn) { 34 if (!destroyed) 35 destroy(); 36 super.reset(swigCPtr = cPtr, cMemoryOwn); 37 } 38 getCPtr(btBroadphasePair obj)39 public static long getCPtr(btBroadphasePair obj) { 40 return (obj == null) ? 0 : obj.swigCPtr; 41 } 42 43 @Override finalize()44 protected void finalize() throws Throwable { 45 if (!destroyed) 46 destroy(); 47 super.finalize(); 48 } 49 delete()50 @Override protected synchronized void delete() { 51 if (swigCPtr != 0) { 52 if (swigCMemOwn) { 53 swigCMemOwn = false; 54 CollisionJNI.delete_btBroadphasePair(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 61 /** Temporary instance, use by native methods that return a btBroadphasePair instance */ 62 protected final static btBroadphasePair temp = new btBroadphasePair(0, false); internalTemp(long cPtr, boolean own)63 public static btBroadphasePair internalTemp(long cPtr, boolean own) { 64 temp.reset(cPtr, own); 65 return temp; 66 } 67 /** Pool of btBroadphasePair instances, used by director interface to provide the arguments. */ 68 protected static final com.badlogic.gdx.utils.Pool<btBroadphasePair> pool = new com.badlogic.gdx.utils.Pool<btBroadphasePair>() { 69 @Override 70 protected btBroadphasePair newObject() { 71 return new btBroadphasePair(0, false); 72 } 73 }; 74 /** Reuses a previous freed instance or creates a new instance and set it to reflect the specified native object */ obtain(long cPtr, boolean own)75 public static btBroadphasePair obtain(long cPtr, boolean own) { 76 final btBroadphasePair result = pool.obtain(); 77 result.reset(cPtr, own); 78 return result; 79 } 80 /** delete the native object if required and allow the instance to be reused by the obtain method */ free(final btBroadphasePair inst)81 public static void free(final btBroadphasePair inst) { 82 inst.dispose(); 83 pool.free(inst); 84 } 85 btBroadphasePair()86 public btBroadphasePair() { 87 this(CollisionJNI.new_btBroadphasePair__SWIG_0(), true); 88 } 89 btBroadphasePair(btBroadphasePair other)90 public btBroadphasePair(btBroadphasePair other) { 91 this(CollisionJNI.new_btBroadphasePair__SWIG_1(other), true); 92 } 93 btBroadphasePair(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1)94 public btBroadphasePair(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) { 95 this(CollisionJNI.new_btBroadphasePair__SWIG_2(proxy0, proxy1), true); 96 } 97 setPProxy0(btBroadphaseProxy value)98 public void setPProxy0(btBroadphaseProxy value) { 99 CollisionJNI.btBroadphasePair_pProxy0_set(swigCPtr, this, btBroadphaseProxy.getCPtr(value), value); 100 } 101 getPProxy0()102 public btBroadphaseProxy getPProxy0() { 103 return btBroadphaseProxy.internalTemp(CollisionJNI.btBroadphasePair_pProxy0_get(swigCPtr, this), false); 104 } 105 setPProxy1(btBroadphaseProxy value)106 public void setPProxy1(btBroadphaseProxy value) { 107 CollisionJNI.btBroadphasePair_pProxy1_set(swigCPtr, this, btBroadphaseProxy.getCPtr(value), value); 108 } 109 getPProxy1()110 public btBroadphaseProxy getPProxy1() { 111 return btBroadphaseProxy.internalTemp(CollisionJNI.btBroadphasePair_pProxy1_get(swigCPtr, this), false); 112 } 113 setAlgorithm(btCollisionAlgorithm value)114 public void setAlgorithm(btCollisionAlgorithm value) { 115 CollisionJNI.btBroadphasePair_algorithm_set(swigCPtr, this, btCollisionAlgorithm.getCPtr(value), value); 116 } 117 getAlgorithm()118 public btCollisionAlgorithm getAlgorithm() { 119 long cPtr = CollisionJNI.btBroadphasePair_algorithm_get(swigCPtr, this); 120 return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false); 121 } 122 setInternalInfo1(long value)123 public void setInternalInfo1(long value) { 124 CollisionJNI.btBroadphasePair_internalInfo1_set(swigCPtr, this, value); 125 } 126 getInternalInfo1()127 public long getInternalInfo1() { 128 return CollisionJNI.btBroadphasePair_internalInfo1_get(swigCPtr, this); 129 } 130 setInternalTmpValue(int value)131 public void setInternalTmpValue(int value) { 132 CollisionJNI.btBroadphasePair_internalTmpValue_set(swigCPtr, this, value); 133 } 134 getInternalTmpValue()135 public int getInternalTmpValue() { 136 return CollisionJNI.btBroadphasePair_internalTmpValue_get(swigCPtr, this); 137 } 138 139 } 140