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 btQuantizedBvh extends BulletBase { 19 private long swigCPtr; 20 btQuantizedBvh(final String className, long cPtr, boolean cMemoryOwn)21 protected btQuantizedBvh(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, cPtr, cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new btQuantizedBvh, normally you should not need this constructor it's intended for low-level usage. */ btQuantizedBvh(long cPtr, boolean cMemoryOwn)27 public btQuantizedBvh(long cPtr, boolean cMemoryOwn) { 28 this("btQuantizedBvh", 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(btQuantizedBvh obj)39 public static long getCPtr(btQuantizedBvh 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_btQuantizedBvh(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 btQuantizedBvh()61 public btQuantizedBvh() { 62 this(CollisionJNI.new_btQuantizedBvh(), true); 63 } 64 setQuantizationValues(Vector3 bvhAabbMin, Vector3 bvhAabbMax, float quantizationMargin)65 public void setQuantizationValues(Vector3 bvhAabbMin, Vector3 bvhAabbMax, float quantizationMargin) { 66 CollisionJNI.btQuantizedBvh_setQuantizationValues__SWIG_0(swigCPtr, this, bvhAabbMin, bvhAabbMax, quantizationMargin); 67 } 68 setQuantizationValues(Vector3 bvhAabbMin, Vector3 bvhAabbMax)69 public void setQuantizationValues(Vector3 bvhAabbMin, Vector3 bvhAabbMax) { 70 CollisionJNI.btQuantizedBvh_setQuantizationValues__SWIG_1(swigCPtr, this, bvhAabbMin, bvhAabbMax); 71 } 72 getLeafNodeArray()73 public SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t getLeafNodeArray() { 74 return new SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t(CollisionJNI.btQuantizedBvh_getLeafNodeArray(swigCPtr, this), false); 75 } 76 buildInternal()77 public void buildInternal() { 78 CollisionJNI.btQuantizedBvh_buildInternal(swigCPtr, this); 79 } 80 reportAabbOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax)81 public void reportAabbOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) { 82 CollisionJNI.btQuantizedBvh_reportAabbOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback), nodeCallback, aabbMin, aabbMax); 83 } 84 reportRayOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget)85 public void reportRayOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget) { 86 CollisionJNI.btQuantizedBvh_reportRayOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback), nodeCallback, raySource, rayTarget); 87 } 88 reportBoxCastOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget, Vector3 aabbMin, Vector3 aabbMax)89 public void reportBoxCastOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget, Vector3 aabbMin, Vector3 aabbMax) { 90 CollisionJNI.btQuantizedBvh_reportBoxCastOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback), nodeCallback, raySource, rayTarget, aabbMin, aabbMax); 91 } 92 quantize(java.nio.IntBuffer out, Vector3 point, int isMax)93 public void quantize(java.nio.IntBuffer out, Vector3 point, int isMax) { 94 assert out.isDirect() : "Buffer must be allocated direct."; 95 { 96 CollisionJNI.btQuantizedBvh_quantize(swigCPtr, this, out, point, isMax); 97 } 98 } 99 quantizeWithClamp(java.nio.IntBuffer out, Vector3 point2, int isMax)100 public void quantizeWithClamp(java.nio.IntBuffer out, Vector3 point2, int isMax) { 101 assert out.isDirect() : "Buffer must be allocated direct."; 102 { 103 CollisionJNI.btQuantizedBvh_quantizeWithClamp(swigCPtr, this, out, point2, isMax); 104 } 105 } 106 unQuantize(java.nio.IntBuffer vecIn)107 public Vector3 unQuantize(java.nio.IntBuffer vecIn) { 108 assert vecIn.isDirect() : "Buffer must be allocated direct."; 109 { 110 return CollisionJNI.btQuantizedBvh_unQuantize(swigCPtr, this, vecIn); 111 } 112 } 113 setTraversalMode(int traversalMode)114 public void setTraversalMode(int traversalMode) { 115 CollisionJNI.btQuantizedBvh_setTraversalMode(swigCPtr, this, traversalMode); 116 } 117 getQuantizedNodeArray()118 public SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t getQuantizedNodeArray() { 119 return new SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t(CollisionJNI.btQuantizedBvh_getQuantizedNodeArray(swigCPtr, this), false); 120 } 121 getSubtreeInfoArray()122 public SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t getSubtreeInfoArray() { 123 return new SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t(CollisionJNI.btQuantizedBvh_getSubtreeInfoArray(swigCPtr, this), false); 124 } 125 calculateSerializeBufferSize()126 public long calculateSerializeBufferSize() { 127 return CollisionJNI.btQuantizedBvh_calculateSerializeBufferSize(swigCPtr, this); 128 } 129 serialize(long o_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian)130 public boolean serialize(long o_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) { 131 return CollisionJNI.btQuantizedBvh_serialize__SWIG_0(swigCPtr, this, o_alignedDataBuffer, i_dataBufferSize, i_swapEndian); 132 } 133 deSerializeInPlace(long i_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian)134 public static btQuantizedBvh deSerializeInPlace(long i_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) { 135 long cPtr = CollisionJNI.btQuantizedBvh_deSerializeInPlace(i_alignedDataBuffer, i_dataBufferSize, i_swapEndian); 136 return (cPtr == 0) ? null : new btQuantizedBvh(cPtr, false); 137 } 138 getAlignmentSerializationPadding()139 public static long getAlignmentSerializationPadding() { 140 return CollisionJNI.btQuantizedBvh_getAlignmentSerializationPadding(); 141 } 142 calculateSerializeBufferSizeNew()143 public int calculateSerializeBufferSizeNew() { 144 return CollisionJNI.btQuantizedBvh_calculateSerializeBufferSizeNew(swigCPtr, this); 145 } 146 serialize(long dataBuffer, SWIGTYPE_p_btSerializer serializer)147 public String serialize(long dataBuffer, SWIGTYPE_p_btSerializer serializer) { 148 return CollisionJNI.btQuantizedBvh_serialize__SWIG_1(swigCPtr, this, dataBuffer, SWIGTYPE_p_btSerializer.getCPtr(serializer)); 149 } 150 deSerializeFloat(btQuantizedBvhFloatData quantizedBvhFloatData)151 public void deSerializeFloat(btQuantizedBvhFloatData quantizedBvhFloatData) { 152 CollisionJNI.btQuantizedBvh_deSerializeFloat(swigCPtr, this, btQuantizedBvhFloatData.getCPtr(quantizedBvhFloatData), quantizedBvhFloatData); 153 } 154 deSerializeDouble(btQuantizedBvhDoubleData quantizedBvhDoubleData)155 public void deSerializeDouble(btQuantizedBvhDoubleData quantizedBvhDoubleData) { 156 CollisionJNI.btQuantizedBvh_deSerializeDouble(swigCPtr, this, btQuantizedBvhDoubleData.getCPtr(quantizedBvhDoubleData), quantizedBvhDoubleData); 157 } 158 isQuantized()159 public boolean isQuantized() { 160 return CollisionJNI.btQuantizedBvh_isQuantized(swigCPtr, this); 161 } 162 163 public final static class btTraversalMode { 164 public final static int TRAVERSAL_STACKLESS = 0; 165 public final static int TRAVERSAL_STACKLESS_CACHE_FRIENDLY = TRAVERSAL_STACKLESS + 1; 166 public final static int TRAVERSAL_RECURSIVE = TRAVERSAL_STACKLESS_CACHE_FRIENDLY + 1; 167 } 168 169 } 170