OSDN Git Service

Swig generated files
[mikumikustudio/libgdx-mikumikustudio.git] / extensions / gdx-bullet / jni / swig-src / com / badlogic / gdx / physics / bullet / btBroadphasePairArray.java
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.10
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;
10
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;
15
16 public class btBroadphasePairArray extends BulletBase {
17         private long swigCPtr;
18         
19         protected btBroadphasePairArray(final String className, long cPtr, boolean cMemoryOwn) {
20                 super(className, cPtr, cMemoryOwn);
21                 swigCPtr = cPtr;
22         }
23         
24         protected btBroadphasePairArray(long cPtr, boolean cMemoryOwn) {
25                 this("btBroadphasePairArray", cPtr, cMemoryOwn);
26                 construct();
27         }
28         
29         public static long getCPtr(btBroadphasePairArray obj) {
30                 return (obj == null) ? 0 : obj.swigCPtr;
31         }
32
33         @Override
34         protected void finalize() throws Throwable {
35                 if (!destroyed)
36                         destroy();
37                 super.finalize();
38         }
39
40   @Override protected synchronized void delete() {
41                 if (swigCPtr != 0) {
42                         if (swigCMemOwn) {
43                                 swigCMemOwn = false;
44                                 gdxBulletJNI.delete_btBroadphasePairArray(swigCPtr);
45                         }
46                         swigCPtr = 0;
47                 }
48                 super.delete();
49         }
50
51         /**
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));
60                 return out;
61         }
62         
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));
70         }
71
72   public int size() {
73     return gdxBulletJNI.btBroadphasePairArray_size(swigCPtr, this);
74   }
75
76   public btBroadphasePair at(int n) {
77     return new btBroadphasePair(gdxBulletJNI.btBroadphasePairArray_at(swigCPtr, this, n), false);
78   }
79
80   public int getCollisionObjects(int[] result, int max, int other) {
81     return gdxBulletJNI.btBroadphasePairArray_getCollisionObjects(swigCPtr, this, result, max, other);
82   }
83
84   public int getCollisionObjectsValue(int[] result, int max, int other) {
85     return gdxBulletJNI.btBroadphasePairArray_getCollisionObjectsValue(swigCPtr, this, result, max, other);
86   }
87
88   public btBroadphasePairArray() {
89     this(gdxBulletJNI.new_btBroadphasePairArray(), true);
90   }
91
92 }