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 ContactCache extends BulletBase { 19 private long swigCPtr; 20 ContactCache(final String className, long cPtr, boolean cMemoryOwn)21 protected ContactCache(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, cPtr, cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new ContactCache, normally you should not need this constructor it's intended for low-level usage. */ ContactCache(long cPtr, boolean cMemoryOwn)27 public ContactCache(long cPtr, boolean cMemoryOwn) { 28 this("ContactCache", 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(ContactCache obj)39 public static long getCPtr(ContactCache 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_ContactCache(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 swigDirectorDisconnect()61 protected void swigDirectorDisconnect() { 62 swigCMemOwn = false; 63 delete(); 64 } 65 swigReleaseOwnership()66 public void swigReleaseOwnership() { 67 swigCMemOwn = false; 68 CollisionJNI.ContactCache_change_ownership(this, swigCPtr, false); 69 } 70 swigTakeOwnership()71 public void swigTakeOwnership() { 72 swigCMemOwn = true; 73 CollisionJNI.ContactCache_change_ownership(this, swigCPtr, true); 74 } 75 ContactCache()76 public ContactCache() { 77 this(false); 78 enable(); 79 } 80 setCacheTime(float value)81 public void setCacheTime(float value) { 82 CollisionJNI.ContactCache_cacheTime_set(swigCPtr, this, value); 83 } 84 getCacheTime()85 public float getCacheTime() { 86 return CollisionJNI.ContactCache_cacheTime_get(swigCPtr, this); 87 } 88 ContactCache(boolean dummy)89 private ContactCache(boolean dummy) { 90 this(CollisionJNI.new_ContactCache(dummy), true); 91 CollisionJNI.ContactCache_director_connect(this, swigCPtr, swigCMemOwn, true); 92 } 93 enable()94 public void enable() { 95 CollisionJNI.ContactCache_enable(swigCPtr, this); 96 } 97 disable()98 public void disable() { 99 CollisionJNI.ContactCache_disable(swigCPtr, this); 100 } 101 isEnabled()102 public boolean isEnabled() { 103 return CollisionJNI.ContactCache_isEnabled(swigCPtr, this); 104 } 105 onContactStarted(btPersistentManifold manifold, boolean match0, boolean match1)106 public void onContactStarted(btPersistentManifold manifold, boolean match0, boolean match1) { 107 CollisionJNI.ContactCache_onContactStarted(swigCPtr, this, btPersistentManifold.getCPtr(manifold), manifold, match0, match1); 108 } 109 onContactEnded(btCollisionObject colObj0, boolean match0, btCollisionObject colObj1, boolean match1)110 public void onContactEnded(btCollisionObject colObj0, boolean match0, btCollisionObject colObj1, boolean match1) { 111 CollisionJNI.ContactCache_onContactEnded(swigCPtr, this, btCollisionObject.getCPtr(colObj0), colObj0, match0, btCollisionObject.getCPtr(colObj1), colObj1, match1); 112 } 113 clear()114 public void clear() { 115 CollisionJNI.ContactCache_clear(swigCPtr, this); 116 } 117 update(float delta)118 public void update(float delta) { 119 CollisionJNI.ContactCache_update(swigCPtr, this, delta); 120 } 121 122 } 123