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 btConvexShape extends btCollisionShape { 19 private long swigCPtr; 20 btConvexShape(final String className, long cPtr, boolean cMemoryOwn)21 protected btConvexShape(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, CollisionJNI.btConvexShape_SWIGUpcast(cPtr), cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new btConvexShape, normally you should not need this constructor it's intended for low-level usage. */ btConvexShape(long cPtr, boolean cMemoryOwn)27 public btConvexShape(long cPtr, boolean cMemoryOwn) { 28 this("btConvexShape", 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(CollisionJNI.btConvexShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn); 37 } 38 getCPtr(btConvexShape obj)39 public static long getCPtr(btConvexShape 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_btConvexShape(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 localGetSupportingVertex(Vector3 vec)61 public Vector3 localGetSupportingVertex(Vector3 vec) { 62 return CollisionJNI.btConvexShape_localGetSupportingVertex(swigCPtr, this, vec); 63 } 64 localGetSupportingVertexWithoutMargin(Vector3 vec)65 public Vector3 localGetSupportingVertexWithoutMargin(Vector3 vec) { 66 return CollisionJNI.btConvexShape_localGetSupportingVertexWithoutMargin(swigCPtr, this, vec); 67 } 68 localGetSupportVertexWithoutMarginNonVirtual(Vector3 vec)69 public Vector3 localGetSupportVertexWithoutMarginNonVirtual(Vector3 vec) { 70 return CollisionJNI.btConvexShape_localGetSupportVertexWithoutMarginNonVirtual(swigCPtr, this, vec); 71 } 72 localGetSupportVertexNonVirtual(Vector3 vec)73 public Vector3 localGetSupportVertexNonVirtual(Vector3 vec) { 74 return CollisionJNI.btConvexShape_localGetSupportVertexNonVirtual(swigCPtr, this, vec); 75 } 76 getMarginNonVirtual()77 public float getMarginNonVirtual() { 78 return CollisionJNI.btConvexShape_getMarginNonVirtual(swigCPtr, this); 79 } 80 getAabbNonVirtual(Matrix4 t, Vector3 aabbMin, Vector3 aabbMax)81 public void getAabbNonVirtual(Matrix4 t, Vector3 aabbMin, Vector3 aabbMax) { 82 CollisionJNI.btConvexShape_getAabbNonVirtual(swigCPtr, this, t, aabbMin, aabbMax); 83 } 84 project(Matrix4 trans, Vector3 dir, SWIGTYPE_p_float minProj, SWIGTYPE_p_float maxProj, Vector3 witnesPtMin, Vector3 witnesPtMax)85 public void project(Matrix4 trans, Vector3 dir, SWIGTYPE_p_float minProj, SWIGTYPE_p_float maxProj, Vector3 witnesPtMin, Vector3 witnesPtMax) { 86 CollisionJNI.btConvexShape_project(swigCPtr, this, trans, dir, SWIGTYPE_p_float.getCPtr(minProj), SWIGTYPE_p_float.getCPtr(maxProj), witnesPtMin, witnesPtMax); 87 } 88 batchedUnitVectorGetSupportingVertexWithoutMargin(btVector3 vectors, btVector3 supportVerticesOut, int numVectors)89 public void batchedUnitVectorGetSupportingVertexWithoutMargin(btVector3 vectors, btVector3 supportVerticesOut, int numVectors) { 90 CollisionJNI.btConvexShape_batchedUnitVectorGetSupportingVertexWithoutMargin(swigCPtr, this, btVector3.getCPtr(vectors), vectors, btVector3.getCPtr(supportVerticesOut), supportVerticesOut, numVectors); 91 } 92 getAabbSlow(Matrix4 t, Vector3 aabbMin, Vector3 aabbMax)93 public void getAabbSlow(Matrix4 t, Vector3 aabbMin, Vector3 aabbMax) { 94 CollisionJNI.btConvexShape_getAabbSlow(swigCPtr, this, t, aabbMin, aabbMax); 95 } 96 getNumPreferredPenetrationDirections()97 public int getNumPreferredPenetrationDirections() { 98 return CollisionJNI.btConvexShape_getNumPreferredPenetrationDirections(swigCPtr, this); 99 } 100 getPreferredPenetrationDirection(int index, Vector3 penetrationVector)101 public void getPreferredPenetrationDirection(int index, Vector3 penetrationVector) { 102 CollisionJNI.btConvexShape_getPreferredPenetrationDirection(swigCPtr, this, index, penetrationVector); 103 } 104 105 } 106