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 btUniversalConstraint extends btGeneric6DofConstraint { 20 private long swigCPtr; 21 btUniversalConstraint(final String className, long cPtr, boolean cMemoryOwn)22 protected btUniversalConstraint(final String className, long cPtr, boolean cMemoryOwn) { 23 super(className, DynamicsJNI.btUniversalConstraint_SWIGUpcast(cPtr), cMemoryOwn); 24 swigCPtr = cPtr; 25 } 26 27 /** Construct a new btUniversalConstraint, normally you should not need this constructor it's intended for low-level usage. */ btUniversalConstraint(long cPtr, boolean cMemoryOwn)28 public btUniversalConstraint(long cPtr, boolean cMemoryOwn) { 29 this("btUniversalConstraint", 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.btUniversalConstraint_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn); 38 } 39 getCPtr(btUniversalConstraint obj)40 public static long getCPtr(btUniversalConstraint 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_btUniversalConstraint(swigCPtr); 56 } 57 swigCPtr = 0; 58 } 59 super.delete(); 60 } 61 btUniversalConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 anchor, Vector3 axis1, Vector3 axis2)62 public btUniversalConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 anchor, Vector3 axis1, Vector3 axis2) { 63 this(DynamicsJNI.new_btUniversalConstraint(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, anchor, axis1, axis2), true); 64 } 65 getAnchor()66 public Vector3 getAnchor() { 67 return DynamicsJNI.btUniversalConstraint_getAnchor(swigCPtr, this); 68 } 69 getAnchor2()70 public Vector3 getAnchor2() { 71 return DynamicsJNI.btUniversalConstraint_getAnchor2(swigCPtr, this); 72 } 73 getAxis1()74 public Vector3 getAxis1() { 75 return DynamicsJNI.btUniversalConstraint_getAxis1(swigCPtr, this); 76 } 77 getAxis2()78 public Vector3 getAxis2() { 79 return DynamicsJNI.btUniversalConstraint_getAxis2(swigCPtr, this); 80 } 81 getAngle1()82 public float getAngle1() { 83 return DynamicsJNI.btUniversalConstraint_getAngle1(swigCPtr, this); 84 } 85 getAngle2()86 public float getAngle2() { 87 return DynamicsJNI.btUniversalConstraint_getAngle2(swigCPtr, this); 88 } 89 setUpperLimit(float ang1max, float ang2max)90 public void setUpperLimit(float ang1max, float ang2max) { 91 DynamicsJNI.btUniversalConstraint_setUpperLimit(swigCPtr, this, ang1max, ang2max); 92 } 93 setLowerLimit(float ang1min, float ang2min)94 public void setLowerLimit(float ang1min, float ang2min) { 95 DynamicsJNI.btUniversalConstraint_setLowerLimit(swigCPtr, this, ang1min, ang2min); 96 } 97 setAxis(Vector3 axis1, Vector3 axis2)98 public void setAxis(Vector3 axis1, Vector3 axis2) { 99 DynamicsJNI.btUniversalConstraint_setAxis(swigCPtr, this, axis1, axis2); 100 } 101 102 } 103