1 /* ----------------------------------------------------------------------------
\r
2 * This file was automatically generated by SWIG (http://www.swig.org).
\r
5 * Do not make changes to this file unless you know what you are doing--modify
\r
6 * the SWIG interface file instead.
\r
7 * ----------------------------------------------------------------------------- */
\r
9 package com.badlogic.gdx.physics.bullet;
\r
11 import com.badlogic.gdx.math.Vector3;
\r
12 import com.badlogic.gdx.math.Quaternion;
\r
13 import com.badlogic.gdx.math.Matrix3;
\r
14 import com.badlogic.gdx.math.Matrix4;
\r
16 public class btRaycastVehicle extends btActionInterface {
\r
17 private long swigCPtr;
\r
19 protected btRaycastVehicle(final String className, long cPtr, boolean cMemoryOwn) {
\r
20 super(className, gdxBulletJNI.btRaycastVehicle_SWIGUpcast(cPtr), cMemoryOwn);
\r
24 protected btRaycastVehicle(long cPtr, boolean cMemoryOwn) {
\r
25 this("btRaycastVehicle", cPtr, cMemoryOwn);
\r
29 public static long getCPtr(btRaycastVehicle obj) {
\r
30 return (obj == null) ? 0 : obj.swigCPtr;
\r
34 protected void finalize() throws Throwable {
\r
40 @Override protected synchronized void delete() {
\r
41 if (swigCPtr != 0) {
\r
43 swigCMemOwn = false;
\r
44 gdxBulletJNI.delete_btRaycastVehicle(swigCPtr);
\r
51 public btRaycastVehicle(btVehicleTuning tuning, btRigidBody chassis, btVehicleRaycaster raycaster) {
\r
52 this(gdxBulletJNI.new_btRaycastVehicle(btVehicleTuning.getCPtr(tuning), tuning, btRigidBody.getCPtr(chassis), chassis, btVehicleRaycaster.getCPtr(raycaster), raycaster), true);
\r
55 public Matrix4 getChassisWorldTransform() {
\r
56 return gdxBulletJNI.btRaycastVehicle_getChassisWorldTransform(swigCPtr, this);
\r
59 public float rayCast(btWheelInfo wheel) {
\r
60 return gdxBulletJNI.btRaycastVehicle_rayCast(swigCPtr, this, btWheelInfo.getCPtr(wheel), wheel);
\r
63 public void updateVehicle(float step) {
\r
64 gdxBulletJNI.btRaycastVehicle_updateVehicle(swigCPtr, this, step);
\r
67 public void resetSuspension() {
\r
68 gdxBulletJNI.btRaycastVehicle_resetSuspension(swigCPtr, this);
\r
71 public float getSteeringValue(int wheel) {
\r
72 return gdxBulletJNI.btRaycastVehicle_getSteeringValue(swigCPtr, this, wheel);
\r
75 public void setSteeringValue(float steering, int wheel) {
\r
76 gdxBulletJNI.btRaycastVehicle_setSteeringValue(swigCPtr, this, steering, wheel);
\r
79 public void applyEngineForce(float force, int wheel) {
\r
80 gdxBulletJNI.btRaycastVehicle_applyEngineForce(swigCPtr, this, force, wheel);
\r
83 public Matrix4 getWheelTransformWS(int wheelIndex) {
\r
84 return gdxBulletJNI.btRaycastVehicle_getWheelTransformWS(swigCPtr, this, wheelIndex);
\r
87 public void updateWheelTransform(int wheelIndex, boolean interpolatedTransform) {
\r
88 gdxBulletJNI.btRaycastVehicle_updateWheelTransform__SWIG_0(swigCPtr, this, wheelIndex, interpolatedTransform);
\r
91 public void updateWheelTransform(int wheelIndex) {
\r
92 gdxBulletJNI.btRaycastVehicle_updateWheelTransform__SWIG_1(swigCPtr, this, wheelIndex);
\r
95 public btWheelInfo addWheel(Vector3 connectionPointCS0, Vector3 wheelDirectionCS0, Vector3 wheelAxleCS, float suspensionRestLength, float wheelRadius, btVehicleTuning tuning, boolean isFrontWheel) {
\r
96 return new btWheelInfo(gdxBulletJNI.btRaycastVehicle_addWheel(swigCPtr, this, connectionPointCS0, wheelDirectionCS0, wheelAxleCS, suspensionRestLength, wheelRadius, btVehicleTuning.getCPtr(tuning), tuning, isFrontWheel), false);
\r
99 public int getNumWheels() {
\r
100 return gdxBulletJNI.btRaycastVehicle_getNumWheels(swigCPtr, this);
\r
103 public void setWheelInfo(SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t value) {
\r
104 gdxBulletJNI.btRaycastVehicle_wheelInfo_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t.getCPtr(value));
\r
107 public SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t getWheelInfo() {
\r
108 long cPtr = gdxBulletJNI.btRaycastVehicle_wheelInfo_get(swigCPtr, this);
\r
109 return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t(cPtr, false);
\r
112 public btWheelInfo getWheelInfo(int index) {
\r
113 return new btWheelInfo(gdxBulletJNI.btRaycastVehicle_getWheelInfo__SWIG_0(swigCPtr, this, index), false);
\r
116 public void updateWheelTransformsWS(btWheelInfo wheel, boolean interpolatedTransform) {
\r
117 gdxBulletJNI.btRaycastVehicle_updateWheelTransformsWS__SWIG_0(swigCPtr, this, btWheelInfo.getCPtr(wheel), wheel, interpolatedTransform);
\r
120 public void updateWheelTransformsWS(btWheelInfo wheel) {
\r
121 gdxBulletJNI.btRaycastVehicle_updateWheelTransformsWS__SWIG_1(swigCPtr, this, btWheelInfo.getCPtr(wheel), wheel);
\r
124 public void setBrake(float brake, int wheelIndex) {
\r
125 gdxBulletJNI.btRaycastVehicle_setBrake(swigCPtr, this, brake, wheelIndex);
\r
128 public void setPitchControl(float pitch) {
\r
129 gdxBulletJNI.btRaycastVehicle_setPitchControl(swigCPtr, this, pitch);
\r
132 public void updateSuspension(float deltaTime) {
\r
133 gdxBulletJNI.btRaycastVehicle_updateSuspension(swigCPtr, this, deltaTime);
\r
136 public void updateFriction(float timeStep) {
\r
137 gdxBulletJNI.btRaycastVehicle_updateFriction(swigCPtr, this, timeStep);
\r
140 public btRigidBody getRigidBody() {
\r
141 long cPtr = gdxBulletJNI.btRaycastVehicle_getRigidBody__SWIG_0(swigCPtr, this);
\r
142 return (cPtr == 0) ? null : new btRigidBody(cPtr, false);
\r
145 public int getRightAxis() {
\r
146 return gdxBulletJNI.btRaycastVehicle_getRightAxis(swigCPtr, this);
\r
149 public int getUpAxis() {
\r
150 return gdxBulletJNI.btRaycastVehicle_getUpAxis(swigCPtr, this);
\r
153 public int getForwardAxis() {
\r
154 return gdxBulletJNI.btRaycastVehicle_getForwardAxis(swigCPtr, this);
\r
157 public Vector3 getForwardVector() {
\r
158 return gdxBulletJNI.btRaycastVehicle_getForwardVector(swigCPtr, this);
\r
161 public float getCurrentSpeedKmHour() {
\r
162 return gdxBulletJNI.btRaycastVehicle_getCurrentSpeedKmHour(swigCPtr, this);
\r
165 public void setCoordinateSystem(int rightIndex, int upIndex, int forwardIndex) {
\r
166 gdxBulletJNI.btRaycastVehicle_setCoordinateSystem(swigCPtr, this, rightIndex, upIndex, forwardIndex);
\r
169 public int getUserConstraintType() {
\r
170 return gdxBulletJNI.btRaycastVehicle_getUserConstraintType(swigCPtr, this);
\r
173 public void setUserConstraintType(int userConstraintType) {
\r
174 gdxBulletJNI.btRaycastVehicle_setUserConstraintType(swigCPtr, this, userConstraintType);
\r
177 public void setUserConstraintId(int uid) {
\r
178 gdxBulletJNI.btRaycastVehicle_setUserConstraintId(swigCPtr, this, uid);
\r
181 public int getUserConstraintId() {
\r
182 return gdxBulletJNI.btRaycastVehicle_getUserConstraintId(swigCPtr, this);
\r