• 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 btSolverBody extends BulletBase {
20 	private long swigCPtr;
21 
btSolverBody(final String className, long cPtr, boolean cMemoryOwn)22 	protected btSolverBody(final String className, long cPtr, boolean cMemoryOwn) {
23 		super(className, cPtr, cMemoryOwn);
24 		swigCPtr = cPtr;
25 	}
26 
27 	/** Construct a new btSolverBody, normally you should not need this constructor it's intended for low-level usage. */
btSolverBody(long cPtr, boolean cMemoryOwn)28 	public btSolverBody(long cPtr, boolean cMemoryOwn) {
29 		this("btSolverBody", 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(swigCPtr = cPtr, cMemoryOwn);
38 	}
39 
getCPtr(btSolverBody obj)40 	public static long getCPtr(btSolverBody 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_btSolverBody(swigCPtr);
56 			}
57 			swigCPtr = 0;
58 		}
59 		super.delete();
60 	}
61 
setWorldTransform(btTransform value)62   public void setWorldTransform(btTransform value) {
63     DynamicsJNI.btSolverBody_worldTransform_set(swigCPtr, this, btTransform.getCPtr(value), value);
64   }
65 
getWorldTransform()66   public btTransform getWorldTransform() {
67     long cPtr = DynamicsJNI.btSolverBody_worldTransform_get(swigCPtr, this);
68     return (cPtr == 0) ? null : new btTransform(cPtr, false);
69   }
70 
setDeltaLinearVelocity(btVector3 value)71   public void setDeltaLinearVelocity(btVector3 value) {
72     DynamicsJNI.btSolverBody_deltaLinearVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
73   }
74 
getDeltaLinearVelocity()75   public btVector3 getDeltaLinearVelocity() {
76     long cPtr = DynamicsJNI.btSolverBody_deltaLinearVelocity_get(swigCPtr, this);
77     return (cPtr == 0) ? null : new btVector3(cPtr, false);
78   }
79 
setDeltaAngularVelocity(btVector3 value)80   public void setDeltaAngularVelocity(btVector3 value) {
81     DynamicsJNI.btSolverBody_deltaAngularVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
82   }
83 
getDeltaAngularVelocity()84   public btVector3 getDeltaAngularVelocity() {
85     long cPtr = DynamicsJNI.btSolverBody_deltaAngularVelocity_get(swigCPtr, this);
86     return (cPtr == 0) ? null : new btVector3(cPtr, false);
87   }
88 
setAngularFactor(btVector3 value)89   public void setAngularFactor(btVector3 value) {
90     DynamicsJNI.btSolverBody_angularFactor_set(swigCPtr, this, btVector3.getCPtr(value), value);
91   }
92 
getAngularFactor()93   public btVector3 getAngularFactor() {
94     long cPtr = DynamicsJNI.btSolverBody_angularFactor_get(swigCPtr, this);
95     return (cPtr == 0) ? null : new btVector3(cPtr, false);
96   }
97 
setLinearFactor(btVector3 value)98   public void setLinearFactor(btVector3 value) {
99     DynamicsJNI.btSolverBody_linearFactor_set(swigCPtr, this, btVector3.getCPtr(value), value);
100   }
101 
getLinearFactor()102   public btVector3 getLinearFactor() {
103     long cPtr = DynamicsJNI.btSolverBody_linearFactor_get(swigCPtr, this);
104     return (cPtr == 0) ? null : new btVector3(cPtr, false);
105   }
106 
setInvMass(btVector3 value)107   public void setInvMass(btVector3 value) {
108     DynamicsJNI.btSolverBody_invMass_set(swigCPtr, this, btVector3.getCPtr(value), value);
109   }
110 
getInvMass()111   public btVector3 getInvMass() {
112     long cPtr = DynamicsJNI.btSolverBody_invMass_get(swigCPtr, this);
113     return (cPtr == 0) ? null : new btVector3(cPtr, false);
114   }
115 
setPushVelocity(btVector3 value)116   public void setPushVelocity(btVector3 value) {
117     DynamicsJNI.btSolverBody_pushVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
118   }
119 
getPushVelocity()120   public btVector3 getPushVelocity() {
121     long cPtr = DynamicsJNI.btSolverBody_pushVelocity_get(swigCPtr, this);
122     return (cPtr == 0) ? null : new btVector3(cPtr, false);
123   }
124 
setTurnVelocity(btVector3 value)125   public void setTurnVelocity(btVector3 value) {
126     DynamicsJNI.btSolverBody_turnVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
127   }
128 
getTurnVelocity()129   public btVector3 getTurnVelocity() {
130     long cPtr = DynamicsJNI.btSolverBody_turnVelocity_get(swigCPtr, this);
131     return (cPtr == 0) ? null : new btVector3(cPtr, false);
132   }
133 
setLinearVelocity(btVector3 value)134   public void setLinearVelocity(btVector3 value) {
135     DynamicsJNI.btSolverBody_linearVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
136   }
137 
getLinearVelocity()138   public btVector3 getLinearVelocity() {
139     long cPtr = DynamicsJNI.btSolverBody_linearVelocity_get(swigCPtr, this);
140     return (cPtr == 0) ? null : new btVector3(cPtr, false);
141   }
142 
setAngularVelocity(btVector3 value)143   public void setAngularVelocity(btVector3 value) {
144     DynamicsJNI.btSolverBody_angularVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
145   }
146 
getAngularVelocity()147   public btVector3 getAngularVelocity() {
148     long cPtr = DynamicsJNI.btSolverBody_angularVelocity_get(swigCPtr, this);
149     return (cPtr == 0) ? null : new btVector3(cPtr, false);
150   }
151 
setExternalForceImpulse(btVector3 value)152   public void setExternalForceImpulse(btVector3 value) {
153     DynamicsJNI.btSolverBody_externalForceImpulse_set(swigCPtr, this, btVector3.getCPtr(value), value);
154   }
155 
getExternalForceImpulse()156   public btVector3 getExternalForceImpulse() {
157     long cPtr = DynamicsJNI.btSolverBody_externalForceImpulse_get(swigCPtr, this);
158     return (cPtr == 0) ? null : new btVector3(cPtr, false);
159   }
160 
setExternalTorqueImpulse(btVector3 value)161   public void setExternalTorqueImpulse(btVector3 value) {
162     DynamicsJNI.btSolverBody_externalTorqueImpulse_set(swigCPtr, this, btVector3.getCPtr(value), value);
163   }
164 
getExternalTorqueImpulse()165   public btVector3 getExternalTorqueImpulse() {
166     long cPtr = DynamicsJNI.btSolverBody_externalTorqueImpulse_get(swigCPtr, this);
167     return (cPtr == 0) ? null : new btVector3(cPtr, false);
168   }
169 
setOriginalBody(btRigidBody value)170   public void setOriginalBody(btRigidBody value) {
171     DynamicsJNI.btSolverBody_originalBody_set(swigCPtr, this, btRigidBody.getCPtr(value), value);
172   }
173 
getOriginalBody()174   public btRigidBody getOriginalBody() {
175 	return btRigidBody.getInstance(DynamicsJNI.btSolverBody_originalBody_get(swigCPtr, this), false);
176 }
177 
getVelocityInLocalPointNoDelta(Vector3 rel_pos, Vector3 velocity)178   public void getVelocityInLocalPointNoDelta(Vector3 rel_pos, Vector3 velocity) {
179     DynamicsJNI.btSolverBody_getVelocityInLocalPointNoDelta(swigCPtr, this, rel_pos, velocity);
180   }
181 
getVelocityInLocalPointObsolete(Vector3 rel_pos, Vector3 velocity)182   public void getVelocityInLocalPointObsolete(Vector3 rel_pos, Vector3 velocity) {
183     DynamicsJNI.btSolverBody_getVelocityInLocalPointObsolete(swigCPtr, this, rel_pos, velocity);
184   }
185 
getAngularVelocity(Vector3 angVel)186   public void getAngularVelocity(Vector3 angVel) {
187     DynamicsJNI.btSolverBody_getAngularVelocity(swigCPtr, this, angVel);
188   }
189 
applyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude)190   public void applyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
191     DynamicsJNI.btSolverBody_applyImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
192   }
193 
internalApplyPushImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude)194   public void internalApplyPushImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
195     DynamicsJNI.btSolverBody_internalApplyPushImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
196   }
197 
internalGetDeltaLinearVelocity()198   public Vector3 internalGetDeltaLinearVelocity() {
199 	return DynamicsJNI.btSolverBody_internalGetDeltaLinearVelocity(swigCPtr, this);
200 }
201 
internalGetDeltaAngularVelocity()202   public Vector3 internalGetDeltaAngularVelocity() {
203 	return DynamicsJNI.btSolverBody_internalGetDeltaAngularVelocity(swigCPtr, this);
204 }
205 
internalGetAngularFactor()206   public Vector3 internalGetAngularFactor() {
207 	return DynamicsJNI.btSolverBody_internalGetAngularFactor(swigCPtr, this);
208 }
209 
internalGetInvMass()210   public Vector3 internalGetInvMass() {
211 	return DynamicsJNI.btSolverBody_internalGetInvMass(swigCPtr, this);
212 }
213 
internalSetInvMass(Vector3 invMass)214   public void internalSetInvMass(Vector3 invMass) {
215     DynamicsJNI.btSolverBody_internalSetInvMass(swigCPtr, this, invMass);
216   }
217 
internalGetPushVelocity()218   public Vector3 internalGetPushVelocity() {
219 	return DynamicsJNI.btSolverBody_internalGetPushVelocity(swigCPtr, this);
220 }
221 
internalGetTurnVelocity()222   public Vector3 internalGetTurnVelocity() {
223 	return DynamicsJNI.btSolverBody_internalGetTurnVelocity(swigCPtr, this);
224 }
225 
internalGetVelocityInLocalPointObsolete(Vector3 rel_pos, Vector3 velocity)226   public void internalGetVelocityInLocalPointObsolete(Vector3 rel_pos, Vector3 velocity) {
227     DynamicsJNI.btSolverBody_internalGetVelocityInLocalPointObsolete(swigCPtr, this, rel_pos, velocity);
228   }
229 
internalGetAngularVelocity(Vector3 angVel)230   public void internalGetAngularVelocity(Vector3 angVel) {
231     DynamicsJNI.btSolverBody_internalGetAngularVelocity(swigCPtr, this, angVel);
232   }
233 
internalApplyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude)234   public void internalApplyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
235     DynamicsJNI.btSolverBody_internalApplyImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
236   }
237 
writebackVelocity()238   public void writebackVelocity() {
239     DynamicsJNI.btSolverBody_writebackVelocity(swigCPtr, this);
240   }
241 
writebackVelocityAndTransform(float timeStep, float splitImpulseTurnErp)242   public void writebackVelocityAndTransform(float timeStep, float splitImpulseTurnErp) {
243     DynamicsJNI.btSolverBody_writebackVelocityAndTransform(swigCPtr, this, timeStep, splitImpulseTurnErp);
244   }
245 
btSolverBody()246   public btSolverBody() {
247     this(DynamicsJNI.new_btSolverBody(), true);
248   }
249 
250 }
251