Home | History | Annotate | Download | only in collision
      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 btDbvtNode extends BulletBase {
     19 	private long swigCPtr;
     20 
     21 	protected btDbvtNode(final String className, long cPtr, boolean cMemoryOwn) {
     22 		super(className, cPtr, cMemoryOwn);
     23 		swigCPtr = cPtr;
     24 	}
     25 
     26 	/** Construct a new btDbvtNode, normally you should not need this constructor it's intended for low-level usage. */
     27 	public btDbvtNode(long cPtr, boolean cMemoryOwn) {
     28 		this("btDbvtNode", 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(btDbvtNode 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_btDbvtNode(swigCPtr);
     55 			}
     56 			swigCPtr = 0;
     57 		}
     58 		super.delete();
     59 	}
     60 
     61 	private final static btDbvtNode temp = new btDbvtNode(0, false);
     62 	/** Obtains a temporary instance, used by native methods that return a btDbvtNode instance */
     63 	public static btDbvtNode internalTemp(long cPtr, boolean own) {
     64 		temp.reset(cPtr, own);
     65 		return temp;
     66 	}
     67 	private static btDbvtNode[] argumentInstances = new btDbvtNode[] {new btDbvtNode(0, false),
     68 		new btDbvtNode(0, false), new btDbvtNode(0, false), new btDbvtNode(0, false)};
     69 	private static int argumentIndex = -1;
     70 	/** Obtains a temporary instance, used for callback methods with one or more btDbvtNode arguments */
     71 	protected static btDbvtNode obtainForArgument(final long swigCPtr, boolean owner) {
     72 		btDbvtNode instance = argumentInstances[argumentIndex = (argumentIndex + 1) & 3];
     73 		instance.reset(swigCPtr, owner);
     74 		return instance;
     75 	}
     76 
     77   public void setVolume(btDbvtAabbMm value) {
     78     CollisionJNI.btDbvtNode_volume_set(swigCPtr, this, btDbvtAabbMm.getCPtr(value), value);
     79   }
     80 
     81   public btDbvtAabbMm getVolume() {
     82 	return btDbvtAabbMm.internalTemp(CollisionJNI.btDbvtNode_volume_get(swigCPtr, this), false);
     83 }
     84 
     85   public void setParent(btDbvtNode value) {
     86     CollisionJNI.btDbvtNode_parent_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
     87   }
     88 
     89   public btDbvtNode getParent() {
     90 	return btDbvtNode.internalTemp(CollisionJNI.btDbvtNode_parent_get(swigCPtr, this), false);
     91 }
     92 
     93   public boolean isleaf() {
     94     return CollisionJNI.btDbvtNode_isleaf(swigCPtr, this);
     95   }
     96 
     97   public boolean isinternal() {
     98     return CollisionJNI.btDbvtNode_isinternal(swigCPtr, this);
     99   }
    100 
    101   public void setChilds(SWIGTYPE_p_p_btDbvtNode value) {
    102     CollisionJNI.btDbvtNode_childs_set(swigCPtr, this, SWIGTYPE_p_p_btDbvtNode.getCPtr(value));
    103   }
    104 
    105   public SWIGTYPE_p_p_btDbvtNode getChilds() {
    106     long cPtr = CollisionJNI.btDbvtNode_childs_get(swigCPtr, this);
    107     return (cPtr == 0) ? null : new SWIGTYPE_p_p_btDbvtNode(cPtr, false);
    108   }
    109 
    110   public void setData(long value) {
    111     CollisionJNI.btDbvtNode_data_set(swigCPtr, this, value);
    112   }
    113 
    114   public long getData() {
    115     return CollisionJNI.btDbvtNode_data_get(swigCPtr, this);
    116   }
    117 
    118   public void setDataAsInt(int value) {
    119     CollisionJNI.btDbvtNode_dataAsInt_set(swigCPtr, this, value);
    120   }
    121 
    122   public int getDataAsInt() {
    123     return CollisionJNI.btDbvtNode_dataAsInt_get(swigCPtr, this);
    124   }
    125 
    126   public btDbvtNode getChild(int index) {
    127 	return btDbvtNode.internalTemp(CollisionJNI.btDbvtNode_getChild(swigCPtr, this, index), false);
    128 }
    129 
    130   public btDbvtNode getChild0() {
    131 	return btDbvtNode.internalTemp(CollisionJNI.btDbvtNode_getChild0(swigCPtr, this), false);
    132 }
    133 
    134   public btDbvtNode getChild1() {
    135 	return btDbvtNode.internalTemp(CollisionJNI.btDbvtNode_getChild1(swigCPtr, this), false);
    136 }
    137 
    138   public btBroadphaseProxy getDataAsProxy() {
    139 	return btBroadphaseProxy.internalTemp(CollisionJNI.btDbvtNode_getDataAsProxy(swigCPtr, this), false);
    140 }
    141 
    142   public btCollisionObject getDataAsProxyClientObject() {
    143 	return btCollisionObject.getInstance(CollisionJNI.btDbvtNode_getDataAsProxyClientObject(swigCPtr, this), false);
    144 }
    145 
    146   public btDbvtNode() {
    147     this(CollisionJNI.new_btDbvtNode(), true);
    148   }
    149 
    150 }
    151