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 btPersistentManifold extends btTypedObject { 19 private long swigCPtr; 20 btPersistentManifold(final String className, long cPtr, boolean cMemoryOwn)21 protected btPersistentManifold(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, CollisionJNI.btPersistentManifold_SWIGUpcast(cPtr), cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new btPersistentManifold, normally you should not need this constructor it's intended for low-level usage. */ btPersistentManifold(long cPtr, boolean cMemoryOwn)27 public btPersistentManifold(long cPtr, boolean cMemoryOwn) { 28 this("btPersistentManifold", 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(CollisionJNI.btPersistentManifold_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn); 37 } 38 getCPtr(btPersistentManifold obj)39 public static long getCPtr(btPersistentManifold 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_btPersistentManifold(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 setCompanionIdA(int value)61 public void setCompanionIdA(int value) { 62 CollisionJNI.btPersistentManifold_companionIdA_set(swigCPtr, this, value); 63 } 64 getCompanionIdA()65 public int getCompanionIdA() { 66 return CollisionJNI.btPersistentManifold_companionIdA_get(swigCPtr, this); 67 } 68 setCompanionIdB(int value)69 public void setCompanionIdB(int value) { 70 CollisionJNI.btPersistentManifold_companionIdB_set(swigCPtr, this, value); 71 } 72 getCompanionIdB()73 public int getCompanionIdB() { 74 return CollisionJNI.btPersistentManifold_companionIdB_get(swigCPtr, this); 75 } 76 setIndex1a(int value)77 public void setIndex1a(int value) { 78 CollisionJNI.btPersistentManifold_index1a_set(swigCPtr, this, value); 79 } 80 getIndex1a()81 public int getIndex1a() { 82 return CollisionJNI.btPersistentManifold_index1a_get(swigCPtr, this); 83 } 84 btPersistentManifold()85 public btPersistentManifold() { 86 this(CollisionJNI.new_btPersistentManifold__SWIG_0(), true); 87 } 88 btPersistentManifold(btCollisionObject body0, btCollisionObject body1, int arg2, float contactBreakingThreshold, float contactProcessingThreshold)89 public btPersistentManifold(btCollisionObject body0, btCollisionObject body1, int arg2, float contactBreakingThreshold, float contactProcessingThreshold) { 90 this(CollisionJNI.new_btPersistentManifold__SWIG_1(btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, arg2, contactBreakingThreshold, contactProcessingThreshold), true); 91 } 92 getBody0()93 public btCollisionObject getBody0() { 94 return btCollisionObject.getInstance(CollisionJNI.btPersistentManifold_getBody0(swigCPtr, this), false); 95 } 96 getBody1()97 public btCollisionObject getBody1() { 98 return btCollisionObject.getInstance(CollisionJNI.btPersistentManifold_getBody1(swigCPtr, this), false); 99 } 100 setBodies(btCollisionObject body0, btCollisionObject body1)101 public void setBodies(btCollisionObject body0, btCollisionObject body1) { 102 CollisionJNI.btPersistentManifold_setBodies(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1); 103 } 104 clearUserCache(btManifoldPoint pt)105 public void clearUserCache(btManifoldPoint pt) { 106 CollisionJNI.btPersistentManifold_clearUserCache(swigCPtr, this, btManifoldPoint.getCPtr(pt), pt); 107 } 108 getNumContacts()109 public int getNumContacts() { 110 return CollisionJNI.btPersistentManifold_getNumContacts(swigCPtr, this); 111 } 112 setNumContacts(int cachedPoints)113 public void setNumContacts(int cachedPoints) { 114 CollisionJNI.btPersistentManifold_setNumContacts(swigCPtr, this, cachedPoints); 115 } 116 getContactPoint(int index)117 public btManifoldPoint getContactPoint(int index) { 118 return new btManifoldPoint(CollisionJNI.btPersistentManifold_getContactPoint__SWIG_0(swigCPtr, this, index), false); 119 } 120 getContactBreakingThreshold()121 public float getContactBreakingThreshold() { 122 return CollisionJNI.btPersistentManifold_getContactBreakingThreshold(swigCPtr, this); 123 } 124 getContactProcessingThreshold()125 public float getContactProcessingThreshold() { 126 return CollisionJNI.btPersistentManifold_getContactProcessingThreshold(swigCPtr, this); 127 } 128 setContactBreakingThreshold(float contactBreakingThreshold)129 public void setContactBreakingThreshold(float contactBreakingThreshold) { 130 CollisionJNI.btPersistentManifold_setContactBreakingThreshold(swigCPtr, this, contactBreakingThreshold); 131 } 132 setContactProcessingThreshold(float contactProcessingThreshold)133 public void setContactProcessingThreshold(float contactProcessingThreshold) { 134 CollisionJNI.btPersistentManifold_setContactProcessingThreshold(swigCPtr, this, contactProcessingThreshold); 135 } 136 getCacheEntry(btManifoldPoint newPoint)137 public int getCacheEntry(btManifoldPoint newPoint) { 138 return CollisionJNI.btPersistentManifold_getCacheEntry(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint); 139 } 140 addManifoldPoint(btManifoldPoint newPoint, boolean isPredictive)141 public int addManifoldPoint(btManifoldPoint newPoint, boolean isPredictive) { 142 return CollisionJNI.btPersistentManifold_addManifoldPoint__SWIG_0(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint, isPredictive); 143 } 144 addManifoldPoint(btManifoldPoint newPoint)145 public int addManifoldPoint(btManifoldPoint newPoint) { 146 return CollisionJNI.btPersistentManifold_addManifoldPoint__SWIG_1(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint); 147 } 148 removeContactPoint(int index)149 public void removeContactPoint(int index) { 150 CollisionJNI.btPersistentManifold_removeContactPoint(swigCPtr, this, index); 151 } 152 replaceContactPoint(btManifoldPoint newPoint, int insertIndex)153 public void replaceContactPoint(btManifoldPoint newPoint, int insertIndex) { 154 CollisionJNI.btPersistentManifold_replaceContactPoint(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint, insertIndex); 155 } 156 validContactDistance(btManifoldPoint pt)157 public boolean validContactDistance(btManifoldPoint pt) { 158 return CollisionJNI.btPersistentManifold_validContactDistance(swigCPtr, this, btManifoldPoint.getCPtr(pt), pt); 159 } 160 refreshContactPoints(Matrix4 trA, Matrix4 trB)161 public void refreshContactPoints(Matrix4 trA, Matrix4 trB) { 162 CollisionJNI.btPersistentManifold_refreshContactPoints(swigCPtr, this, trA, trB); 163 } 164 clearManifold()165 public void clearManifold() { 166 CollisionJNI.btPersistentManifold_clearManifold(swigCPtr, this); 167 } 168 169 } 170