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.linearmath; 10 11 import com.badlogic.gdx.physics.bullet.BulletBase; 12 import com.badlogic.gdx.math.Vector3; 13 import com.badlogic.gdx.math.Quaternion; 14 import com.badlogic.gdx.math.Matrix3; 15 import com.badlogic.gdx.math.Matrix4; 16 17 public class btVector3 extends BulletBase { 18 private long swigCPtr; 19 btVector3(final String className, long cPtr, boolean cMemoryOwn)20 protected btVector3(final String className, long cPtr, boolean cMemoryOwn) { 21 super(className, cPtr, cMemoryOwn); 22 swigCPtr = cPtr; 23 } 24 25 /** Construct a new btVector3, normally you should not need this constructor it's intended for low-level usage. */ btVector3(long cPtr, boolean cMemoryOwn)26 public btVector3(long cPtr, boolean cMemoryOwn) { 27 this("btVector3", cPtr, cMemoryOwn); 28 construct(); 29 } 30 31 @Override reset(long cPtr, boolean cMemoryOwn)32 protected void reset(long cPtr, boolean cMemoryOwn) { 33 if (!destroyed) 34 destroy(); 35 super.reset(swigCPtr = cPtr, cMemoryOwn); 36 } 37 getCPtr(btVector3 obj)38 public static long getCPtr(btVector3 obj) { 39 return (obj == null) ? 0 : obj.swigCPtr; 40 } 41 42 @Override finalize()43 protected void finalize() throws Throwable { 44 if (!destroyed) 45 destroy(); 46 super.finalize(); 47 } 48 delete()49 @Override protected synchronized void delete() { 50 if (swigCPtr != 0) { 51 if (swigCMemOwn) { 52 swigCMemOwn = false; 53 LinearMathJNI.delete_btVector3(swigCPtr); 54 } 55 swigCPtr = 0; 56 } 57 super.delete(); 58 } 59 setFloats(float[] value)60 public void setFloats(float[] value) { 61 LinearMathJNI.btVector3_floats_set(swigCPtr, this, value); 62 } 63 getFloats()64 public float[] getFloats() { 65 return LinearMathJNI.btVector3_floats_get(swigCPtr, this); 66 } 67 btVector3()68 public btVector3() { 69 this(LinearMathJNI.new_btVector3__SWIG_0(), true); 70 } 71 btVector3(float _x, float _y, float _z)72 public btVector3(float _x, float _y, float _z) { 73 this(LinearMathJNI.new_btVector3__SWIG_1(_x, _y, _z), true); 74 } 75 dot(Vector3 v)76 public float dot(Vector3 v) { 77 return LinearMathJNI.btVector3_dot(swigCPtr, this, v); 78 } 79 length2()80 public float length2() { 81 return LinearMathJNI.btVector3_length2(swigCPtr, this); 82 } 83 length()84 public float length() { 85 return LinearMathJNI.btVector3_length(swigCPtr, this); 86 } 87 norm()88 public float norm() { 89 return LinearMathJNI.btVector3_norm(swigCPtr, this); 90 } 91 distance2(Vector3 v)92 public float distance2(Vector3 v) { 93 return LinearMathJNI.btVector3_distance2(swigCPtr, this, v); 94 } 95 distance(Vector3 v)96 public float distance(Vector3 v) { 97 return LinearMathJNI.btVector3_distance(swigCPtr, this, v); 98 } 99 safeNormalize()100 public Vector3 safeNormalize() { 101 return LinearMathJNI.btVector3_safeNormalize(swigCPtr, this); 102 } 103 normalize()104 public Vector3 normalize() { 105 return LinearMathJNI.btVector3_normalize(swigCPtr, this); 106 } 107 normalized()108 public Vector3 normalized() { 109 return LinearMathJNI.btVector3_normalized(swigCPtr, this); 110 } 111 rotate(Vector3 wAxis, float angle)112 public Vector3 rotate(Vector3 wAxis, float angle) { 113 return LinearMathJNI.btVector3_rotate(swigCPtr, this, wAxis, angle); 114 } 115 angle(Vector3 v)116 public float angle(Vector3 v) { 117 return LinearMathJNI.btVector3_angle(swigCPtr, this, v); 118 } 119 absolute()120 public Vector3 absolute() { 121 return LinearMathJNI.btVector3_absolute(swigCPtr, this); 122 } 123 cross(Vector3 v)124 public Vector3 cross(Vector3 v) { 125 return LinearMathJNI.btVector3_cross(swigCPtr, this, v); 126 } 127 triple(Vector3 v1, Vector3 v2)128 public float triple(Vector3 v1, Vector3 v2) { 129 return LinearMathJNI.btVector3_triple(swigCPtr, this, v1, v2); 130 } 131 minAxis()132 public int minAxis() { 133 return LinearMathJNI.btVector3_minAxis(swigCPtr, this); 134 } 135 maxAxis()136 public int maxAxis() { 137 return LinearMathJNI.btVector3_maxAxis(swigCPtr, this); 138 } 139 furthestAxis()140 public int furthestAxis() { 141 return LinearMathJNI.btVector3_furthestAxis(swigCPtr, this); 142 } 143 closestAxis()144 public int closestAxis() { 145 return LinearMathJNI.btVector3_closestAxis(swigCPtr, this); 146 } 147 setInterpolate3(Vector3 v0, Vector3 v1, float rt)148 public void setInterpolate3(Vector3 v0, Vector3 v1, float rt) { 149 LinearMathJNI.btVector3_setInterpolate3(swigCPtr, this, v0, v1, rt); 150 } 151 lerp(Vector3 v, float t)152 public Vector3 lerp(Vector3 v, float t) { 153 return LinearMathJNI.btVector3_lerp(swigCPtr, this, v, t); 154 } 155 getX()156 public float getX() { 157 return LinearMathJNI.btVector3_getX(swigCPtr, this); 158 } 159 getY()160 public float getY() { 161 return LinearMathJNI.btVector3_getY(swigCPtr, this); 162 } 163 getZ()164 public float getZ() { 165 return LinearMathJNI.btVector3_getZ(swigCPtr, this); 166 } 167 setX(float _x)168 public void setX(float _x) { 169 LinearMathJNI.btVector3_setX(swigCPtr, this, _x); 170 } 171 setY(float _y)172 public void setY(float _y) { 173 LinearMathJNI.btVector3_setY(swigCPtr, this, _y); 174 } 175 setZ(float _z)176 public void setZ(float _z) { 177 LinearMathJNI.btVector3_setZ(swigCPtr, this, _z); 178 } 179 setW(float _w)180 public void setW(float _w) { 181 LinearMathJNI.btVector3_setW(swigCPtr, this, _w); 182 } 183 x()184 public float x() { 185 return LinearMathJNI.btVector3_x(swigCPtr, this); 186 } 187 y()188 public float y() { 189 return LinearMathJNI.btVector3_y(swigCPtr, this); 190 } 191 z()192 public float z() { 193 return LinearMathJNI.btVector3_z(swigCPtr, this); 194 } 195 w()196 public float w() { 197 return LinearMathJNI.btVector3_w(swigCPtr, this); 198 } 199 setMax(Vector3 other)200 public void setMax(Vector3 other) { 201 LinearMathJNI.btVector3_setMax(swigCPtr, this, other); 202 } 203 setMin(Vector3 other)204 public void setMin(Vector3 other) { 205 LinearMathJNI.btVector3_setMin(swigCPtr, this, other); 206 } 207 setValue(float _x, float _y, float _z)208 public void setValue(float _x, float _y, float _z) { 209 LinearMathJNI.btVector3_setValue(swigCPtr, this, _x, _y, _z); 210 } 211 getSkewSymmetricMatrix(btVector3 v0, btVector3 v1, btVector3 v2)212 public void getSkewSymmetricMatrix(btVector3 v0, btVector3 v1, btVector3 v2) { 213 LinearMathJNI.btVector3_getSkewSymmetricMatrix(swigCPtr, this, btVector3.getCPtr(v0), v0, btVector3.getCPtr(v1), v1, btVector3.getCPtr(v2), v2); 214 } 215 setZero()216 public void setZero() { 217 LinearMathJNI.btVector3_setZero(swigCPtr, this); 218 } 219 isZero()220 public boolean isZero() { 221 return LinearMathJNI.btVector3_isZero(swigCPtr, this); 222 } 223 fuzzyZero()224 public boolean fuzzyZero() { 225 return LinearMathJNI.btVector3_fuzzyZero(swigCPtr, this); 226 } 227 serialize(btVector3FloatData dataOut)228 public void serialize(btVector3FloatData dataOut) { 229 LinearMathJNI.btVector3_serialize(swigCPtr, this, btVector3FloatData.getCPtr(dataOut), dataOut); 230 } 231 deSerialize(btVector3FloatData dataIn)232 public void deSerialize(btVector3FloatData dataIn) { 233 LinearMathJNI.btVector3_deSerialize(swigCPtr, this, btVector3FloatData.getCPtr(dataIn), dataIn); 234 } 235 serializeFloat(btVector3FloatData dataOut)236 public void serializeFloat(btVector3FloatData dataOut) { 237 LinearMathJNI.btVector3_serializeFloat(swigCPtr, this, btVector3FloatData.getCPtr(dataOut), dataOut); 238 } 239 deSerializeFloat(btVector3FloatData dataIn)240 public void deSerializeFloat(btVector3FloatData dataIn) { 241 LinearMathJNI.btVector3_deSerializeFloat(swigCPtr, this, btVector3FloatData.getCPtr(dataIn), dataIn); 242 } 243 serializeDouble(btVector3DoubleData dataOut)244 public void serializeDouble(btVector3DoubleData dataOut) { 245 LinearMathJNI.btVector3_serializeDouble(swigCPtr, this, btVector3DoubleData.getCPtr(dataOut), dataOut); 246 } 247 deSerializeDouble(btVector3DoubleData dataIn)248 public void deSerializeDouble(btVector3DoubleData dataIn) { 249 LinearMathJNI.btVector3_deSerializeDouble(swigCPtr, this, btVector3DoubleData.getCPtr(dataIn), dataIn); 250 } 251 maxDot(btVector3 array, int array_count, SWIGTYPE_p_float dotOut)252 public int maxDot(btVector3 array, int array_count, SWIGTYPE_p_float dotOut) { 253 return LinearMathJNI.btVector3_maxDot(swigCPtr, this, btVector3.getCPtr(array), array, array_count, SWIGTYPE_p_float.getCPtr(dotOut)); 254 } 255 minDot(btVector3 array, int array_count, SWIGTYPE_p_float dotOut)256 public int minDot(btVector3 array, int array_count, SWIGTYPE_p_float dotOut) { 257 return LinearMathJNI.btVector3_minDot(swigCPtr, this, btVector3.getCPtr(array), array, array_count, SWIGTYPE_p_float.getCPtr(dotOut)); 258 } 259 dot3(Vector3 v0, Vector3 v1, Vector3 v2)260 public Vector3 dot3(Vector3 v0, Vector3 v1, Vector3 v2) { 261 return LinearMathJNI.btVector3_dot3(swigCPtr, this, v0, v1, v2); 262 } 263 264 } 265