1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
9 package com.badlogic.gdx.physics.bullet;
11 import com.badlogic.gdx.math.Vector3;
12 import com.badlogic.gdx.math.Quaternion;
13 import com.badlogic.gdx.math.Matrix3;
14 import com.badlogic.gdx.math.Matrix4;
16 public class btBroadphasePairArray extends BulletBase {
17 private long swigCPtr;
19 protected btBroadphasePairArray(final String className, long cPtr, boolean cMemoryOwn) {
20 super(className, cPtr, cMemoryOwn);
24 protected btBroadphasePairArray(long cPtr, boolean cMemoryOwn) {
25 this("btBroadphasePairArray", cPtr, cMemoryOwn);
29 public static long getCPtr(btBroadphasePairArray obj) {
30 return (obj == null) ? 0 : obj.swigCPtr;
34 protected void finalize() throws Throwable {
40 @Override protected synchronized void delete() {
44 gdxBulletJNI.delete_btBroadphasePairArray(swigCPtr);
52 * @param out The array to fill with collision objects
53 * @param other The collision object the pair must contain (which itself is excluded from the result)
54 * @param tempArray A temporary array used by the method, not more object than the length of this array are added
55 * @return The array specified by out */
56 public com.badlogic.gdx.utils.Array<btCollisionObject> getCollisionObjects(final com.badlogic.gdx.utils.Array<btCollisionObject> out, final btCollisionObject other, final int[] tempArray) {
57 final int c = getCollisionObjects(tempArray, tempArray.length, (int)btCollisionObject.getCPtr(other));
58 for (int i = 0; i < c; i++)
59 out.add(btCollisionObject.getInstance(tempArray[i], false));
63 /** Fills the given array with user value set using {@link btCollisionObject#setUserValue(int)} of the collision objects
64 * within this pair array colliding with the given collision object.
65 * @param out The array to fill with the user values
66 * @param other The collision object the pair must contain (which itself is excluded from the result)
67 * @return The amount of user values set in the out array. */
68 public int getCollisionObjectsValue(final int[] out, final btCollisionObject other) {
69 return getCollisionObjectsValue(out, out.length, (int)btCollisionObject.getCPtr(other));
73 return gdxBulletJNI.btBroadphasePairArray_size(swigCPtr, this);
76 public btBroadphasePair at(int n) {
77 return new btBroadphasePair(gdxBulletJNI.btBroadphasePairArray_at(swigCPtr, this, n), false);
80 public int getCollisionObjects(int[] result, int max, int other) {
81 return gdxBulletJNI.btBroadphasePairArray_getCollisionObjects(swigCPtr, this, result, max, other);
84 public int getCollisionObjectsValue(int[] result, int max, int other) {
85 return gdxBulletJNI.btBroadphasePairArray_getCollisionObjectsValue(swigCPtr, this, result, max, other);
88 public btBroadphasePairArray() {
89 this(gdxBulletJNI.new_btBroadphasePairArray(), true);