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 btCollisionObjectArray extends BulletBase { 19 private long swigCPtr; 20 21 protected btCollisionObjectArray(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, cPtr, cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new btCollisionObjectArray, normally you should not need this constructor it's intended for low-level usage. */ 27 public btCollisionObjectArray(long cPtr, boolean cMemoryOwn) { 28 this("btCollisionObjectArray", cPtr, cMemoryOwn); 29 construct(); 30 } 31 32 @Override 33 protected void reset(long cPtr, boolean cMemoryOwn) { 34 if (!destroyed) 35 destroy(); 36 super.reset(swigCPtr = cPtr, cMemoryOwn); 37 } 38 39 public static long getCPtr(btCollisionObjectArray obj) { 40 return (obj == null) ? 0 : obj.swigCPtr; 41 } 42 43 @Override 44 protected void finalize() throws Throwable { 45 if (!destroyed) 46 destroy(); 47 super.finalize(); 48 } 49 50 @Override protected synchronized void delete() { 51 if (swigCPtr != 0) { 52 if (swigCMemOwn) { 53 swigCMemOwn = false; 54 CollisionJNI.delete_btCollisionObjectArray(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 61 public btCollisionObjectArray() { 62 this(CollisionJNI.new_btCollisionObjectArray__SWIG_0(), true); 63 } 64 65 public btCollisionObjectArray(btCollisionObjectArray otherArray) { 66 this(CollisionJNI.new_btCollisionObjectArray__SWIG_1(btCollisionObjectArray.getCPtr(otherArray), otherArray), true); 67 } 68 69 public int size() { 70 return CollisionJNI.btCollisionObjectArray_size(swigCPtr, this); 71 } 72 73 public btCollisionObject at(int n) { 74 return btCollisionObject.getInstance(CollisionJNI.btCollisionObjectArray_at__SWIG_0(swigCPtr, this, n), false); 75 } 76 77 public void clear() { 78 CollisionJNI.btCollisionObjectArray_clear(swigCPtr, this); 79 } 80 81 public void pop_back() { 82 CollisionJNI.btCollisionObjectArray_pop_back(swigCPtr, this); 83 } 84 85 public void resizeNoInitialize(int newsize) { 86 CollisionJNI.btCollisionObjectArray_resizeNoInitialize(swigCPtr, this, newsize); 87 } 88 89 public void resize(int newsize, btCollisionObject fillData) { 90 CollisionJNI.btCollisionObjectArray_resize__SWIG_0(swigCPtr, this, newsize, btCollisionObject.getCPtr(fillData), fillData); 91 } 92 93 public void resize(int newsize) { 94 CollisionJNI.btCollisionObjectArray_resize__SWIG_1(swigCPtr, this, newsize); 95 } 96 97 public SWIGTYPE_p_p_btCollisionObject expandNonInitializing() { 98 return new SWIGTYPE_p_p_btCollisionObject(CollisionJNI.btCollisionObjectArray_expandNonInitializing(swigCPtr, this), false); 99 } 100 101 public SWIGTYPE_p_p_btCollisionObject expand(btCollisionObject fillValue) { 102 return new SWIGTYPE_p_p_btCollisionObject(CollisionJNI.btCollisionObjectArray_expand__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(fillValue), fillValue), false); 103 } 104 105 public SWIGTYPE_p_p_btCollisionObject expand() { 106 return new SWIGTYPE_p_p_btCollisionObject(CollisionJNI.btCollisionObjectArray_expand__SWIG_1(swigCPtr, this), false); 107 } 108 109 public void push_back(btCollisionObject _Val) { 110 CollisionJNI.btCollisionObjectArray_push_back(swigCPtr, this, btCollisionObject.getCPtr(_Val), _Val); 111 } 112 113 public int capacity() { 114 return CollisionJNI.btCollisionObjectArray_capacity(swigCPtr, this); 115 } 116 117 public void reserve(int _Count) { 118 CollisionJNI.btCollisionObjectArray_reserve(swigCPtr, this, _Count); 119 } 120 121 static public class less extends BulletBase { 122 private long swigCPtr; 123 124 protected less(final String className, long cPtr, boolean cMemoryOwn) { 125 super(className, cPtr, cMemoryOwn); 126 swigCPtr = cPtr; 127 } 128 129 /** Construct a new less, normally you should not need this constructor it's intended for low-level usage. */ 130 public less(long cPtr, boolean cMemoryOwn) { 131 this("less", cPtr, cMemoryOwn); 132 construct(); 133 } 134 135 @Override 136 protected void reset(long cPtr, boolean cMemoryOwn) { 137 if (!destroyed) 138 destroy(); 139 super.reset(swigCPtr = cPtr, cMemoryOwn); 140 } 141 142 public static long getCPtr(less obj) { 143 return (obj == null) ? 0 : obj.swigCPtr; 144 } 145 146 @Override 147 protected void finalize() throws Throwable { 148 if (!destroyed) 149 destroy(); 150 super.finalize(); 151 } 152 153 @Override protected synchronized void delete() { 154 if (swigCPtr != 0) { 155 if (swigCMemOwn) { 156 swigCMemOwn = false; 157 CollisionJNI.delete_btCollisionObjectArray_less(swigCPtr); 158 } 159 swigCPtr = 0; 160 } 161 super.delete(); 162 } 163 164 public less() { 165 this(CollisionJNI.new_btCollisionObjectArray_less(), true); 166 } 167 168 } 169 170 public void swap(int index0, int index1) { 171 CollisionJNI.btCollisionObjectArray_swap(swigCPtr, this, index0, index1); 172 } 173 174 public int findBinarySearch(btCollisionObject key) { 175 return CollisionJNI.btCollisionObjectArray_findBinarySearch(swigCPtr, this, btCollisionObject.getCPtr(key), key); 176 } 177 178 public int findLinearSearch(btCollisionObject key) { 179 return CollisionJNI.btCollisionObjectArray_findLinearSearch(swigCPtr, this, btCollisionObject.getCPtr(key), key); 180 } 181 182 public void remove(btCollisionObject key) { 183 CollisionJNI.btCollisionObjectArray_remove(swigCPtr, this, btCollisionObject.getCPtr(key), key); 184 } 185 186 public void initializeFromBuffer(long buffer, int size, int capacity) { 187 CollisionJNI.btCollisionObjectArray_initializeFromBuffer(swigCPtr, this, buffer, size, capacity); 188 } 189 190 public void copyFromArray(btCollisionObjectArray otherArray) { 191 CollisionJNI.btCollisionObjectArray_copyFromArray(swigCPtr, this, btCollisionObjectArray.getCPtr(otherArray), otherArray); 192 } 193 194 } 195