• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 btRaycastVehicle extends btActionInterface {
20 	private long swigCPtr;
21 
btRaycastVehicle(final String className, long cPtr, boolean cMemoryOwn)22 	protected btRaycastVehicle(final String className, long cPtr, boolean cMemoryOwn) {
23 		super(className, DynamicsJNI.btRaycastVehicle_SWIGUpcast(cPtr), cMemoryOwn);
24 		swigCPtr = cPtr;
25 	}
26 
27 	/** Construct a new btRaycastVehicle, normally you should not need this constructor it's intended for low-level usage. */
btRaycastVehicle(long cPtr, boolean cMemoryOwn)28 	public btRaycastVehicle(long cPtr, boolean cMemoryOwn) {
29 		this("btRaycastVehicle", 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.btRaycastVehicle_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
38 	}
39 
getCPtr(btRaycastVehicle obj)40 	public static long getCPtr(btRaycastVehicle 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_btRaycastVehicle(swigCPtr);
56 			}
57 			swigCPtr = 0;
58 		}
59 		super.delete();
60 	}
61 
62   static public class btVehicleTuning extends BulletBase {
63   	private long swigCPtr;
64 
btVehicleTuning(final String className, long cPtr, boolean cMemoryOwn)65   	protected btVehicleTuning(final String className, long cPtr, boolean cMemoryOwn) {
66   		super(className, cPtr, cMemoryOwn);
67   		swigCPtr = cPtr;
68   	}
69 
70   	/** Construct a new btVehicleTuning, normally you should not need this constructor it's intended for low-level usage. */
btVehicleTuning(long cPtr, boolean cMemoryOwn)71   	public btVehicleTuning(long cPtr, boolean cMemoryOwn) {
72   		this("btVehicleTuning", cPtr, cMemoryOwn);
73   		construct();
74   	}
75 
76   	@Override
reset(long cPtr, boolean cMemoryOwn)77   	protected void reset(long cPtr, boolean cMemoryOwn) {
78   		if (!destroyed)
79   			destroy();
80   		super.reset(swigCPtr = cPtr, cMemoryOwn);
81   	}
82 
getCPtr(btVehicleTuning obj)83   	public static long getCPtr(btVehicleTuning obj) {
84   		return (obj == null) ? 0 : obj.swigCPtr;
85   	}
86 
87   	@Override
finalize()88   	protected void finalize() throws Throwable {
89   		if (!destroyed)
90   			destroy();
91   		super.finalize();
92   	}
93 
delete()94     @Override protected synchronized void delete() {
95   		if (swigCPtr != 0) {
96   			if (swigCMemOwn) {
97   				swigCMemOwn = false;
98   				DynamicsJNI.delete_btRaycastVehicle_btVehicleTuning(swigCPtr);
99   			}
100   			swigCPtr = 0;
101   		}
102   		super.delete();
103   	}
104 
btVehicleTuning()105     public btVehicleTuning() {
106       this(DynamicsJNI.new_btRaycastVehicle_btVehicleTuning(), true);
107     }
108 
setSuspensionStiffness(float value)109     public void setSuspensionStiffness(float value) {
110       DynamicsJNI.btRaycastVehicle_btVehicleTuning_suspensionStiffness_set(swigCPtr, this, value);
111     }
112 
getSuspensionStiffness()113     public float getSuspensionStiffness() {
114       return DynamicsJNI.btRaycastVehicle_btVehicleTuning_suspensionStiffness_get(swigCPtr, this);
115     }
116 
setSuspensionCompression(float value)117     public void setSuspensionCompression(float value) {
118       DynamicsJNI.btRaycastVehicle_btVehicleTuning_suspensionCompression_set(swigCPtr, this, value);
119     }
120 
getSuspensionCompression()121     public float getSuspensionCompression() {
122       return DynamicsJNI.btRaycastVehicle_btVehicleTuning_suspensionCompression_get(swigCPtr, this);
123     }
124 
setSuspensionDamping(float value)125     public void setSuspensionDamping(float value) {
126       DynamicsJNI.btRaycastVehicle_btVehicleTuning_suspensionDamping_set(swigCPtr, this, value);
127     }
128 
getSuspensionDamping()129     public float getSuspensionDamping() {
130       return DynamicsJNI.btRaycastVehicle_btVehicleTuning_suspensionDamping_get(swigCPtr, this);
131     }
132 
setMaxSuspensionTravelCm(float value)133     public void setMaxSuspensionTravelCm(float value) {
134       DynamicsJNI.btRaycastVehicle_btVehicleTuning_maxSuspensionTravelCm_set(swigCPtr, this, value);
135     }
136 
getMaxSuspensionTravelCm()137     public float getMaxSuspensionTravelCm() {
138       return DynamicsJNI.btRaycastVehicle_btVehicleTuning_maxSuspensionTravelCm_get(swigCPtr, this);
139     }
140 
setFrictionSlip(float value)141     public void setFrictionSlip(float value) {
142       DynamicsJNI.btRaycastVehicle_btVehicleTuning_frictionSlip_set(swigCPtr, this, value);
143     }
144 
getFrictionSlip()145     public float getFrictionSlip() {
146       return DynamicsJNI.btRaycastVehicle_btVehicleTuning_frictionSlip_get(swigCPtr, this);
147     }
148 
setMaxSuspensionForce(float value)149     public void setMaxSuspensionForce(float value) {
150       DynamicsJNI.btRaycastVehicle_btVehicleTuning_maxSuspensionForce_set(swigCPtr, this, value);
151     }
152 
getMaxSuspensionForce()153     public float getMaxSuspensionForce() {
154       return DynamicsJNI.btRaycastVehicle_btVehicleTuning_maxSuspensionForce_get(swigCPtr, this);
155     }
156 
157   }
158 
btRaycastVehicle(btRaycastVehicle.btVehicleTuning tuning, btRigidBody chassis, btVehicleRaycaster raycaster)159   public btRaycastVehicle(btRaycastVehicle.btVehicleTuning tuning, btRigidBody chassis, btVehicleRaycaster raycaster) {
160     this(DynamicsJNI.new_btRaycastVehicle(btRaycastVehicle.btVehicleTuning.getCPtr(tuning), tuning, btRigidBody.getCPtr(chassis), chassis, btVehicleRaycaster.getCPtr(raycaster), raycaster), true);
161   }
162 
getChassisWorldTransform()163   public Matrix4 getChassisWorldTransform() {
164 	return DynamicsJNI.btRaycastVehicle_getChassisWorldTransform(swigCPtr, this);
165 }
166 
rayCast(btWheelInfo wheel)167   public float rayCast(btWheelInfo wheel) {
168     return DynamicsJNI.btRaycastVehicle_rayCast(swigCPtr, this, btWheelInfo.getCPtr(wheel), wheel);
169   }
170 
updateVehicle(float step)171   public void updateVehicle(float step) {
172     DynamicsJNI.btRaycastVehicle_updateVehicle(swigCPtr, this, step);
173   }
174 
resetSuspension()175   public void resetSuspension() {
176     DynamicsJNI.btRaycastVehicle_resetSuspension(swigCPtr, this);
177   }
178 
getSteeringValue(int wheel)179   public float getSteeringValue(int wheel) {
180     return DynamicsJNI.btRaycastVehicle_getSteeringValue(swigCPtr, this, wheel);
181   }
182 
setSteeringValue(float steering, int wheel)183   public void setSteeringValue(float steering, int wheel) {
184     DynamicsJNI.btRaycastVehicle_setSteeringValue(swigCPtr, this, steering, wheel);
185   }
186 
applyEngineForce(float force, int wheel)187   public void applyEngineForce(float force, int wheel) {
188     DynamicsJNI.btRaycastVehicle_applyEngineForce(swigCPtr, this, force, wheel);
189   }
190 
getWheelTransformWS(int wheelIndex)191   public Matrix4 getWheelTransformWS(int wheelIndex) {
192 	return DynamicsJNI.btRaycastVehicle_getWheelTransformWS(swigCPtr, this, wheelIndex);
193 }
194 
updateWheelTransform(int wheelIndex, boolean interpolatedTransform)195   public void updateWheelTransform(int wheelIndex, boolean interpolatedTransform) {
196     DynamicsJNI.btRaycastVehicle_updateWheelTransform__SWIG_0(swigCPtr, this, wheelIndex, interpolatedTransform);
197   }
198 
updateWheelTransform(int wheelIndex)199   public void updateWheelTransform(int wheelIndex) {
200     DynamicsJNI.btRaycastVehicle_updateWheelTransform__SWIG_1(swigCPtr, this, wheelIndex);
201   }
202 
addWheel(Vector3 connectionPointCS0, Vector3 wheelDirectionCS0, Vector3 wheelAxleCS, float suspensionRestLength, float wheelRadius, btRaycastVehicle.btVehicleTuning tuning, boolean isFrontWheel)203   public btWheelInfo addWheel(Vector3 connectionPointCS0, Vector3 wheelDirectionCS0, Vector3 wheelAxleCS, float suspensionRestLength, float wheelRadius, btRaycastVehicle.btVehicleTuning tuning, boolean isFrontWheel) {
204     return new btWheelInfo(DynamicsJNI.btRaycastVehicle_addWheel(swigCPtr, this, connectionPointCS0, wheelDirectionCS0, wheelAxleCS, suspensionRestLength, wheelRadius, btRaycastVehicle.btVehicleTuning.getCPtr(tuning), tuning, isFrontWheel), false);
205   }
206 
getNumWheels()207   public int getNumWheels() {
208     return DynamicsJNI.btRaycastVehicle_getNumWheels(swigCPtr, this);
209   }
210 
setWheelInfo(SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t value)211   public void setWheelInfo(SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t value) {
212     DynamicsJNI.btRaycastVehicle_wheelInfo_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t.getCPtr(value));
213   }
214 
getWheelInfo()215   public SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t getWheelInfo() {
216     long cPtr = DynamicsJNI.btRaycastVehicle_wheelInfo_get(swigCPtr, this);
217     return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btWheelInfo_t(cPtr, false);
218   }
219 
getWheelInfo(int index)220   public btWheelInfo getWheelInfo(int index) {
221     return new btWheelInfo(DynamicsJNI.btRaycastVehicle_getWheelInfo__SWIG_0(swigCPtr, this, index), false);
222   }
223 
updateWheelTransformsWS(btWheelInfo wheel, boolean interpolatedTransform)224   public void updateWheelTransformsWS(btWheelInfo wheel, boolean interpolatedTransform) {
225     DynamicsJNI.btRaycastVehicle_updateWheelTransformsWS__SWIG_0(swigCPtr, this, btWheelInfo.getCPtr(wheel), wheel, interpolatedTransform);
226   }
227 
updateWheelTransformsWS(btWheelInfo wheel)228   public void updateWheelTransformsWS(btWheelInfo wheel) {
229     DynamicsJNI.btRaycastVehicle_updateWheelTransformsWS__SWIG_1(swigCPtr, this, btWheelInfo.getCPtr(wheel), wheel);
230   }
231 
setBrake(float brake, int wheelIndex)232   public void setBrake(float brake, int wheelIndex) {
233     DynamicsJNI.btRaycastVehicle_setBrake(swigCPtr, this, brake, wheelIndex);
234   }
235 
setPitchControl(float pitch)236   public void setPitchControl(float pitch) {
237     DynamicsJNI.btRaycastVehicle_setPitchControl(swigCPtr, this, pitch);
238   }
239 
updateSuspension(float deltaTime)240   public void updateSuspension(float deltaTime) {
241     DynamicsJNI.btRaycastVehicle_updateSuspension(swigCPtr, this, deltaTime);
242   }
243 
updateFriction(float timeStep)244   public void updateFriction(float timeStep) {
245     DynamicsJNI.btRaycastVehicle_updateFriction(swigCPtr, this, timeStep);
246   }
247 
getRigidBody()248   public btRigidBody getRigidBody() {
249 	return btRigidBody.getInstance(DynamicsJNI.btRaycastVehicle_getRigidBody__SWIG_0(swigCPtr, this), false);
250 }
251 
getRightAxis()252   public int getRightAxis() {
253     return DynamicsJNI.btRaycastVehicle_getRightAxis(swigCPtr, this);
254   }
255 
getUpAxis()256   public int getUpAxis() {
257     return DynamicsJNI.btRaycastVehicle_getUpAxis(swigCPtr, this);
258   }
259 
getForwardAxis()260   public int getForwardAxis() {
261     return DynamicsJNI.btRaycastVehicle_getForwardAxis(swigCPtr, this);
262   }
263 
getForwardVector()264   public Vector3 getForwardVector() {
265 	return DynamicsJNI.btRaycastVehicle_getForwardVector(swigCPtr, this);
266 }
267 
getCurrentSpeedKmHour()268   public float getCurrentSpeedKmHour() {
269     return DynamicsJNI.btRaycastVehicle_getCurrentSpeedKmHour(swigCPtr, this);
270   }
271 
setCoordinateSystem(int rightIndex, int upIndex, int forwardIndex)272   public void setCoordinateSystem(int rightIndex, int upIndex, int forwardIndex) {
273     DynamicsJNI.btRaycastVehicle_setCoordinateSystem(swigCPtr, this, rightIndex, upIndex, forwardIndex);
274   }
275 
getUserConstraintType()276   public int getUserConstraintType() {
277     return DynamicsJNI.btRaycastVehicle_getUserConstraintType(swigCPtr, this);
278   }
279 
setUserConstraintType(int userConstraintType)280   public void setUserConstraintType(int userConstraintType) {
281     DynamicsJNI.btRaycastVehicle_setUserConstraintType(swigCPtr, this, userConstraintType);
282   }
283 
setUserConstraintId(int uid)284   public void setUserConstraintId(int uid) {
285     DynamicsJNI.btRaycastVehicle_setUserConstraintId(swigCPtr, this, uid);
286   }
287 
getUserConstraintId()288   public int getUserConstraintId() {
289     return DynamicsJNI.btRaycastVehicle_getUserConstraintId(swigCPtr, this);
290   }
291 
292 }
293