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.dynamics; 10 11 import com.badlogic.gdx.physics.bullet.BulletBase; 12 import com.badlogic.gdx.physics.bullet.linearmath.*; 13 import com.badlogic.gdx.physics.bullet.collision.*; 14 import com.badlogic.gdx.math.Vector3; 15 import com.badlogic.gdx.math.Quaternion; 16 import com.badlogic.gdx.math.Matrix3; 17 import com.badlogic.gdx.math.Matrix4; 18 19 public class btHingeConstraint extends btTypedConstraint { 20 private long swigCPtr; 21 btHingeConstraint(final String className, long cPtr, boolean cMemoryOwn)22 protected btHingeConstraint(final String className, long cPtr, boolean cMemoryOwn) { 23 super(className, DynamicsJNI.btHingeConstraint_SWIGUpcast(cPtr), cMemoryOwn); 24 swigCPtr = cPtr; 25 } 26 27 /** Construct a new btHingeConstraint, normally you should not need this constructor it's intended for low-level usage. */ btHingeConstraint(long cPtr, boolean cMemoryOwn)28 public btHingeConstraint(long cPtr, boolean cMemoryOwn) { 29 this("btHingeConstraint", cPtr, cMemoryOwn); 30 construct(); 31 } 32 33 @Override reset(long cPtr, boolean cMemoryOwn)34 protected void reset(long cPtr, boolean cMemoryOwn) { 35 if (!destroyed) 36 destroy(); 37 super.reset(DynamicsJNI.btHingeConstraint_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn); 38 } 39 getCPtr(btHingeConstraint obj)40 public static long getCPtr(btHingeConstraint obj) { 41 return (obj == null) ? 0 : obj.swigCPtr; 42 } 43 44 @Override finalize()45 protected void finalize() throws Throwable { 46 if (!destroyed) 47 destroy(); 48 super.finalize(); 49 } 50 delete()51 @Override protected synchronized void delete() { 52 if (swigCPtr != 0) { 53 if (swigCMemOwn) { 54 swigCMemOwn = false; 55 DynamicsJNI.delete_btHingeConstraint(swigCPtr); 56 } 57 swigCPtr = 0; 58 } 59 super.delete(); 60 } 61 btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB, boolean useReferenceFrameA)62 public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB, boolean useReferenceFrameA) { 63 this(DynamicsJNI.new_btHingeConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, pivotInA, pivotInB, axisInA, axisInB, useReferenceFrameA), true); 64 } 65 btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB)66 public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB) { 67 this(DynamicsJNI.new_btHingeConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, pivotInA, pivotInB, axisInA, axisInB), true); 68 } 69 btHingeConstraint(btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA, boolean useReferenceFrameA)70 public btHingeConstraint(btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA, boolean useReferenceFrameA) { 71 this(DynamicsJNI.new_btHingeConstraint__SWIG_2(btRigidBody.getCPtr(rbA), rbA, pivotInA, axisInA, useReferenceFrameA), true); 72 } 73 btHingeConstraint(btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA)74 public btHingeConstraint(btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA) { 75 this(DynamicsJNI.new_btHingeConstraint__SWIG_3(btRigidBody.getCPtr(rbA), rbA, pivotInA, axisInA), true); 76 } 77 btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Matrix4 rbAFrame, Matrix4 rbBFrame, boolean useReferenceFrameA)78 public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Matrix4 rbAFrame, Matrix4 rbBFrame, boolean useReferenceFrameA) { 79 this(DynamicsJNI.new_btHingeConstraint__SWIG_4(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, rbAFrame, rbBFrame, useReferenceFrameA), true); 80 } 81 btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Matrix4 rbAFrame, Matrix4 rbBFrame)82 public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Matrix4 rbAFrame, Matrix4 rbBFrame) { 83 this(DynamicsJNI.new_btHingeConstraint__SWIG_5(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, rbAFrame, rbBFrame), true); 84 } 85 btHingeConstraint(btRigidBody rbA, Matrix4 rbAFrame, boolean useReferenceFrameA)86 public btHingeConstraint(btRigidBody rbA, Matrix4 rbAFrame, boolean useReferenceFrameA) { 87 this(DynamicsJNI.new_btHingeConstraint__SWIG_6(btRigidBody.getCPtr(rbA), rbA, rbAFrame, useReferenceFrameA), true); 88 } 89 btHingeConstraint(btRigidBody rbA, Matrix4 rbAFrame)90 public btHingeConstraint(btRigidBody rbA, Matrix4 rbAFrame) { 91 this(DynamicsJNI.new_btHingeConstraint__SWIG_7(btRigidBody.getCPtr(rbA), rbA, rbAFrame), true); 92 } 93 getInfo1NonVirtual(btTypedConstraint.btConstraintInfo1 info)94 public void getInfo1NonVirtual(btTypedConstraint.btConstraintInfo1 info) { 95 DynamicsJNI.btHingeConstraint_getInfo1NonVirtual(swigCPtr, this, btTypedConstraint.btConstraintInfo1.getCPtr(info), info); 96 } 97 getInfo2NonVirtual(btTypedConstraint.btConstraintInfo2 info, Matrix4 transA, Matrix4 transB, Vector3 angVelA, Vector3 angVelB)98 public void getInfo2NonVirtual(btTypedConstraint.btConstraintInfo2 info, Matrix4 transA, Matrix4 transB, Vector3 angVelA, Vector3 angVelB) { 99 DynamicsJNI.btHingeConstraint_getInfo2NonVirtual(swigCPtr, this, btTypedConstraint.btConstraintInfo2.getCPtr(info), info, transA, transB, angVelA, angVelB); 100 } 101 getInfo2Internal(btTypedConstraint.btConstraintInfo2 info, Matrix4 transA, Matrix4 transB, Vector3 angVelA, Vector3 angVelB)102 public void getInfo2Internal(btTypedConstraint.btConstraintInfo2 info, Matrix4 transA, Matrix4 transB, Vector3 angVelA, Vector3 angVelB) { 103 DynamicsJNI.btHingeConstraint_getInfo2Internal(swigCPtr, this, btTypedConstraint.btConstraintInfo2.getCPtr(info), info, transA, transB, angVelA, angVelB); 104 } 105 getInfo2InternalUsingFrameOffset(btTypedConstraint.btConstraintInfo2 info, Matrix4 transA, Matrix4 transB, Vector3 angVelA, Vector3 angVelB)106 public void getInfo2InternalUsingFrameOffset(btTypedConstraint.btConstraintInfo2 info, Matrix4 transA, Matrix4 transB, Vector3 angVelA, Vector3 angVelB) { 107 DynamicsJNI.btHingeConstraint_getInfo2InternalUsingFrameOffset(swigCPtr, this, btTypedConstraint.btConstraintInfo2.getCPtr(info), info, transA, transB, angVelA, angVelB); 108 } 109 updateRHS(float timeStep)110 public void updateRHS(float timeStep) { 111 DynamicsJNI.btHingeConstraint_updateRHS(swigCPtr, this, timeStep); 112 } 113 getRigidBodyA()114 public btRigidBody getRigidBodyA() { 115 return btRigidBody.getInstance(DynamicsJNI.btHingeConstraint_getRigidBodyA__SWIG_0(swigCPtr, this), false); 116 } 117 getRigidBodyB()118 public btRigidBody getRigidBodyB() { 119 return btRigidBody.getInstance(DynamicsJNI.btHingeConstraint_getRigidBodyB__SWIG_0(swigCPtr, this), false); 120 } 121 getFrameOffsetA()122 public Matrix4 getFrameOffsetA() { 123 return DynamicsJNI.btHingeConstraint_getFrameOffsetA(swigCPtr, this); 124 } 125 getFrameOffsetB()126 public Matrix4 getFrameOffsetB() { 127 return DynamicsJNI.btHingeConstraint_getFrameOffsetB(swigCPtr, this); 128 } 129 setFrames(Matrix4 frameA, Matrix4 frameB)130 public void setFrames(Matrix4 frameA, Matrix4 frameB) { 131 DynamicsJNI.btHingeConstraint_setFrames(swigCPtr, this, frameA, frameB); 132 } 133 setAngularOnly(boolean angularOnly)134 public void setAngularOnly(boolean angularOnly) { 135 DynamicsJNI.btHingeConstraint_setAngularOnly(swigCPtr, this, angularOnly); 136 } 137 enableAngularMotor(boolean enableMotor, float targetVelocity, float maxMotorImpulse)138 public void enableAngularMotor(boolean enableMotor, float targetVelocity, float maxMotorImpulse) { 139 DynamicsJNI.btHingeConstraint_enableAngularMotor(swigCPtr, this, enableMotor, targetVelocity, maxMotorImpulse); 140 } 141 enableMotor(boolean enableMotor)142 public void enableMotor(boolean enableMotor) { 143 DynamicsJNI.btHingeConstraint_enableMotor(swigCPtr, this, enableMotor); 144 } 145 setMaxMotorImpulse(float maxMotorImpulse)146 public void setMaxMotorImpulse(float maxMotorImpulse) { 147 DynamicsJNI.btHingeConstraint_setMaxMotorImpulse(swigCPtr, this, maxMotorImpulse); 148 } 149 setMotorTarget(Quaternion qAinB, float dt)150 public void setMotorTarget(Quaternion qAinB, float dt) { 151 DynamicsJNI.btHingeConstraint_setMotorTarget__SWIG_0(swigCPtr, this, qAinB, dt); 152 } 153 setMotorTarget(float targetAngle, float dt)154 public void setMotorTarget(float targetAngle, float dt) { 155 DynamicsJNI.btHingeConstraint_setMotorTarget__SWIG_1(swigCPtr, this, targetAngle, dt); 156 } 157 setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor)158 public void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) { 159 DynamicsJNI.btHingeConstraint_setLimit__SWIG_0(swigCPtr, this, low, high, _softness, _biasFactor, _relaxationFactor); 160 } 161 setLimit(float low, float high, float _softness, float _biasFactor)162 public void setLimit(float low, float high, float _softness, float _biasFactor) { 163 DynamicsJNI.btHingeConstraint_setLimit__SWIG_1(swigCPtr, this, low, high, _softness, _biasFactor); 164 } 165 setLimit(float low, float high, float _softness)166 public void setLimit(float low, float high, float _softness) { 167 DynamicsJNI.btHingeConstraint_setLimit__SWIG_2(swigCPtr, this, low, high, _softness); 168 } 169 setLimit(float low, float high)170 public void setLimit(float low, float high) { 171 DynamicsJNI.btHingeConstraint_setLimit__SWIG_3(swigCPtr, this, low, high); 172 } 173 setAxis(Vector3 axisInA)174 public void setAxis(Vector3 axisInA) { 175 DynamicsJNI.btHingeConstraint_setAxis(swigCPtr, this, axisInA); 176 } 177 hasLimit()178 public boolean hasLimit() { 179 return DynamicsJNI.btHingeConstraint_hasLimit(swigCPtr, this); 180 } 181 getLowerLimit()182 public float getLowerLimit() { 183 return DynamicsJNI.btHingeConstraint_getLowerLimit(swigCPtr, this); 184 } 185 getUpperLimit()186 public float getUpperLimit() { 187 return DynamicsJNI.btHingeConstraint_getUpperLimit(swigCPtr, this); 188 } 189 getHingeAngle()190 public float getHingeAngle() { 191 return DynamicsJNI.btHingeConstraint_getHingeAngle__SWIG_0(swigCPtr, this); 192 } 193 getHingeAngle(Matrix4 transA, Matrix4 transB)194 public float getHingeAngle(Matrix4 transA, Matrix4 transB) { 195 return DynamicsJNI.btHingeConstraint_getHingeAngle__SWIG_1(swigCPtr, this, transA, transB); 196 } 197 testLimit(Matrix4 transA, Matrix4 transB)198 public void testLimit(Matrix4 transA, Matrix4 transB) { 199 DynamicsJNI.btHingeConstraint_testLimit(swigCPtr, this, transA, transB); 200 } 201 getAFrame()202 public Matrix4 getAFrame() { 203 return DynamicsJNI.btHingeConstraint_getAFrame__SWIG_0(swigCPtr, this); 204 } 205 getBFrame()206 public Matrix4 getBFrame() { 207 return DynamicsJNI.btHingeConstraint_getBFrame__SWIG_0(swigCPtr, this); 208 } 209 getSolveLimit()210 public int getSolveLimit() { 211 return DynamicsJNI.btHingeConstraint_getSolveLimit(swigCPtr, this); 212 } 213 getLimitSign()214 public float getLimitSign() { 215 return DynamicsJNI.btHingeConstraint_getLimitSign(swigCPtr, this); 216 } 217 getAngularOnly()218 public boolean getAngularOnly() { 219 return DynamicsJNI.btHingeConstraint_getAngularOnly(swigCPtr, this); 220 } 221 getEnableAngularMotor()222 public boolean getEnableAngularMotor() { 223 return DynamicsJNI.btHingeConstraint_getEnableAngularMotor(swigCPtr, this); 224 } 225 getMotorTargetVelosity()226 public float getMotorTargetVelosity() { 227 return DynamicsJNI.btHingeConstraint_getMotorTargetVelosity(swigCPtr, this); 228 } 229 getMaxMotorImpulse()230 public float getMaxMotorImpulse() { 231 return DynamicsJNI.btHingeConstraint_getMaxMotorImpulse(swigCPtr, this); 232 } 233 getUseFrameOffset()234 public boolean getUseFrameOffset() { 235 return DynamicsJNI.btHingeConstraint_getUseFrameOffset(swigCPtr, this); 236 } 237 setUseFrameOffset(boolean frameOffsetOnOff)238 public void setUseFrameOffset(boolean frameOffsetOnOff) { 239 DynamicsJNI.btHingeConstraint_setUseFrameOffset(swigCPtr, this, frameOffsetOnOff); 240 } 241 setParam(int num, float value, int axis)242 public void setParam(int num, float value, int axis) { 243 DynamicsJNI.btHingeConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis); 244 } 245 setParam(int num, float value)246 public void setParam(int num, float value) { 247 DynamicsJNI.btHingeConstraint_setParam__SWIG_1(swigCPtr, this, num, value); 248 } 249 getParam(int num, int axis)250 public float getParam(int num, int axis) { 251 return DynamicsJNI.btHingeConstraint_getParam__SWIG_0(swigCPtr, this, num, axis); 252 } 253 getParam(int num)254 public float getParam(int num) { 255 return DynamicsJNI.btHingeConstraint_getParam__SWIG_1(swigCPtr, this, num); 256 } 257 258 } 259