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 btAABB extends BulletBase { 19 private long swigCPtr; 20 btAABB(final String className, long cPtr, boolean cMemoryOwn)21 protected btAABB(final String className, long cPtr, boolean cMemoryOwn) { 22 super(className, cPtr, cMemoryOwn); 23 swigCPtr = cPtr; 24 } 25 26 /** Construct a new btAABB, normally you should not need this constructor it's intended for low-level usage. */ btAABB(long cPtr, boolean cMemoryOwn)27 public btAABB(long cPtr, boolean cMemoryOwn) { 28 this("btAABB", 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(btAABB obj)39 public static long getCPtr(btAABB 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_btAABB(swigCPtr); 55 } 56 swigCPtr = 0; 57 } 58 super.delete(); 59 } 60 setMin(btVector3 value)61 public void setMin(btVector3 value) { 62 CollisionJNI.btAABB_min_set(swigCPtr, this, btVector3.getCPtr(value), value); 63 } 64 getMin()65 public btVector3 getMin() { 66 long cPtr = CollisionJNI.btAABB_min_get(swigCPtr, this); 67 return (cPtr == 0) ? null : new btVector3(cPtr, false); 68 } 69 setMax(btVector3 value)70 public void setMax(btVector3 value) { 71 CollisionJNI.btAABB_max_set(swigCPtr, this, btVector3.getCPtr(value), value); 72 } 73 getMax()74 public btVector3 getMax() { 75 long cPtr = CollisionJNI.btAABB_max_get(swigCPtr, this); 76 return (cPtr == 0) ? null : new btVector3(cPtr, false); 77 } 78 btAABB()79 public btAABB() { 80 this(CollisionJNI.new_btAABB__SWIG_0(), true); 81 } 82 btAABB(Vector3 V1, Vector3 V2, Vector3 V3)83 public btAABB(Vector3 V1, Vector3 V2, Vector3 V3) { 84 this(CollisionJNI.new_btAABB__SWIG_1(V1, V2, V3), true); 85 } 86 btAABB(Vector3 V1, Vector3 V2, Vector3 V3, float margin)87 public btAABB(Vector3 V1, Vector3 V2, Vector3 V3, float margin) { 88 this(CollisionJNI.new_btAABB__SWIG_2(V1, V2, V3, margin), true); 89 } 90 btAABB(btAABB other)91 public btAABB(btAABB other) { 92 this(CollisionJNI.new_btAABB__SWIG_3(btAABB.getCPtr(other), other), true); 93 } 94 btAABB(btAABB other, float margin)95 public btAABB(btAABB other, float margin) { 96 this(CollisionJNI.new_btAABB__SWIG_4(btAABB.getCPtr(other), other, margin), true); 97 } 98 invalidate()99 public void invalidate() { 100 CollisionJNI.btAABB_invalidate(swigCPtr, this); 101 } 102 increment_margin(float margin)103 public void increment_margin(float margin) { 104 CollisionJNI.btAABB_increment_margin(swigCPtr, this, margin); 105 } 106 copy_with_margin(btAABB other, float margin)107 public void copy_with_margin(btAABB other, float margin) { 108 CollisionJNI.btAABB_copy_with_margin(swigCPtr, this, btAABB.getCPtr(other), other, margin); 109 } 110 appy_transform(Matrix4 trans)111 public void appy_transform(Matrix4 trans) { 112 CollisionJNI.btAABB_appy_transform(swigCPtr, this, trans); 113 } 114 appy_transform_trans_cache(BT_BOX_BOX_TRANSFORM_CACHE trans)115 public void appy_transform_trans_cache(BT_BOX_BOX_TRANSFORM_CACHE trans) { 116 CollisionJNI.btAABB_appy_transform_trans_cache(swigCPtr, this, BT_BOX_BOX_TRANSFORM_CACHE.getCPtr(trans), trans); 117 } 118 merge(btAABB box)119 public void merge(btAABB box) { 120 CollisionJNI.btAABB_merge(swigCPtr, this, btAABB.getCPtr(box), box); 121 } 122 get_center_extend(Vector3 center, Vector3 extend)123 public void get_center_extend(Vector3 center, Vector3 extend) { 124 CollisionJNI.btAABB_get_center_extend(swigCPtr, this, center, extend); 125 } 126 find_intersection(btAABB other, btAABB intersection)127 public void find_intersection(btAABB other, btAABB intersection) { 128 CollisionJNI.btAABB_find_intersection(swigCPtr, this, btAABB.getCPtr(other), other, btAABB.getCPtr(intersection), intersection); 129 } 130 has_collision(btAABB other)131 public boolean has_collision(btAABB other) { 132 return CollisionJNI.btAABB_has_collision(swigCPtr, this, btAABB.getCPtr(other), other); 133 } 134 collide_ray(Vector3 vorigin, Vector3 vdir)135 public boolean collide_ray(Vector3 vorigin, Vector3 vdir) { 136 return CollisionJNI.btAABB_collide_ray(swigCPtr, this, vorigin, vdir); 137 } 138 projection_interval(Vector3 direction, SWIGTYPE_p_float vmin, SWIGTYPE_p_float vmax)139 public void projection_interval(Vector3 direction, SWIGTYPE_p_float vmin, SWIGTYPE_p_float vmax) { 140 CollisionJNI.btAABB_projection_interval(swigCPtr, this, direction, SWIGTYPE_p_float.getCPtr(vmin), SWIGTYPE_p_float.getCPtr(vmax)); 141 } 142 plane_classify(btVector4 plane)143 public int plane_classify(btVector4 plane) { 144 return CollisionJNI.btAABB_plane_classify(swigCPtr, this, btVector4.getCPtr(plane), plane); 145 } 146 overlapping_trans_conservative(btAABB box, Matrix4 trans1_to_0)147 public boolean overlapping_trans_conservative(btAABB box, Matrix4 trans1_to_0) { 148 return CollisionJNI.btAABB_overlapping_trans_conservative(swigCPtr, this, btAABB.getCPtr(box), box, trans1_to_0); 149 } 150 overlapping_trans_conservative2(btAABB box, BT_BOX_BOX_TRANSFORM_CACHE trans1_to_0)151 public boolean overlapping_trans_conservative2(btAABB box, BT_BOX_BOX_TRANSFORM_CACHE trans1_to_0) { 152 return CollisionJNI.btAABB_overlapping_trans_conservative2(swigCPtr, this, btAABB.getCPtr(box), box, BT_BOX_BOX_TRANSFORM_CACHE.getCPtr(trans1_to_0), trans1_to_0); 153 } 154 overlapping_trans_cache(btAABB box, BT_BOX_BOX_TRANSFORM_CACHE transcache, boolean fulltest)155 public boolean overlapping_trans_cache(btAABB box, BT_BOX_BOX_TRANSFORM_CACHE transcache, boolean fulltest) { 156 return CollisionJNI.btAABB_overlapping_trans_cache(swigCPtr, this, btAABB.getCPtr(box), box, BT_BOX_BOX_TRANSFORM_CACHE.getCPtr(transcache), transcache, fulltest); 157 } 158 collide_plane(btVector4 plane)159 public boolean collide_plane(btVector4 plane) { 160 return CollisionJNI.btAABB_collide_plane(swigCPtr, this, btVector4.getCPtr(plane), plane); 161 } 162 collide_triangle_exact(Vector3 p1, Vector3 p2, Vector3 p3, btVector4 triangle_plane)163 public boolean collide_triangle_exact(Vector3 p1, Vector3 p2, Vector3 p3, btVector4 triangle_plane) { 164 return CollisionJNI.btAABB_collide_triangle_exact(swigCPtr, this, p1, p2, p3, btVector4.getCPtr(triangle_plane), triangle_plane); 165 } 166 167 } 168