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 btRigidBodyConstructionInfo extends BulletBase {
\r
17 private long swigCPtr;
\r
19 protected btRigidBodyConstructionInfo(final String className, long cPtr, boolean cMemoryOwn) {
\r
20 super(className, cPtr, cMemoryOwn);
\r
24 protected btRigidBodyConstructionInfo(long cPtr, boolean cMemoryOwn) {
\r
25 this("btRigidBodyConstructionInfo", cPtr, cMemoryOwn);
\r
29 public static long getCPtr(btRigidBodyConstructionInfo 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_btRigidBodyConstructionInfo(swigCPtr);
\r
51 protected btMotionState motionState;
\r
53 public void setMotionState(btMotionState motionState) {
\r
54 refMotionState(motionState);
\r
55 setI_motionState(motionState);
\r
58 protected void refMotionState(btMotionState motionState) {
\r
59 if (this.motionState == motionState)
\r
61 if (this.motionState != null)
\r
62 this.motionState.release();
\r
63 this.motionState = motionState;
\r
64 if (this.motionState != null)
\r
65 this.motionState.obtain();
\r
68 public btMotionState getMotionState() {
\r
72 protected btCollisionShape collisionShape;
\r
74 public void setCollisionShape(btCollisionShape collisionShape) {
\r
75 refCollisionShape(collisionShape);
\r
76 setI_collisionShape(collisionShape);
\r
79 protected void refCollisionShape(btCollisionShape shape) {
\r
80 if (collisionShape == shape)
\r
82 if (collisionShape != null)
\r
83 collisionShape.release();
\r
84 collisionShape = shape;
\r
85 if (collisionShape != null)
\r
86 collisionShape.obtain();
\r
89 public btCollisionShape getCollisionShape() {
\r
90 return collisionShape;
\r
93 public btRigidBodyConstructionInfo(float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
\r
94 this(false, mass, motionState, collisionShape, localInertia);
\r
95 refMotionState(motionState);
\r
96 refCollisionShape(collisionShape);
\r
99 public btRigidBodyConstructionInfo(float mass, btMotionState motionState, btCollisionShape collisionShape) {
\r
100 this(false, mass, motionState, collisionShape);
\r
101 refMotionState(motionState);
\r
102 refCollisionShape(collisionShape);
\r
106 public void dispose() {
\r
107 if (motionState != null)
\r
108 motionState.release();
\r
109 motionState = null;
\r
110 if (collisionShape != null)
\r
111 collisionShape.release();
\r
112 collisionShape = null;
\r
116 public void setMass(float value) {
\r
117 gdxBulletJNI.btRigidBodyConstructionInfo_mass_set(swigCPtr, this, value);
\r
120 public float getMass() {
\r
121 return gdxBulletJNI.btRigidBodyConstructionInfo_mass_get(swigCPtr, this);
\r
124 private void setI_motionState(btMotionState value) {
\r
125 gdxBulletJNI.btRigidBodyConstructionInfo_i_motionState_set(swigCPtr, this, btMotionState.getCPtr(value), value);
\r
128 private btMotionState getI_motionState() {
\r
129 long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_i_motionState_get(swigCPtr, this);
\r
130 return (cPtr == 0) ? null : new btMotionState(cPtr, false);
\r
133 public void setStartWorldTransform(btTransform value) {
\r
134 gdxBulletJNI.btRigidBodyConstructionInfo_startWorldTransform_set(swigCPtr, this, btTransform.getCPtr(value), value);
\r
137 public btTransform getStartWorldTransform() {
\r
138 long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_startWorldTransform_get(swigCPtr, this);
\r
139 return (cPtr == 0) ? null : new btTransform(cPtr, false);
\r
142 private void setI_collisionShape(btCollisionShape value) {
\r
143 gdxBulletJNI.btRigidBodyConstructionInfo_i_collisionShape_set(swigCPtr, this, btCollisionShape.getCPtr(value), value);
\r
146 private btCollisionShape getI_collisionShape() {
\r
147 long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_i_collisionShape_get(swigCPtr, this);
\r
148 return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
\r
151 public void setLocalInertia(btVector3 value) {
\r
152 gdxBulletJNI.btRigidBodyConstructionInfo_localInertia_set(swigCPtr, this, btVector3.getCPtr(value), value);
\r
155 public btVector3 getLocalInertia() {
\r
156 long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_localInertia_get(swigCPtr, this);
\r
157 return (cPtr == 0) ? null : new btVector3(cPtr, false);
\r
160 public void setLinearDamping(float value) {
\r
161 gdxBulletJNI.btRigidBodyConstructionInfo_linearDamping_set(swigCPtr, this, value);
\r
164 public float getLinearDamping() {
\r
165 return gdxBulletJNI.btRigidBodyConstructionInfo_linearDamping_get(swigCPtr, this);
\r
168 public void setAngularDamping(float value) {
\r
169 gdxBulletJNI.btRigidBodyConstructionInfo_angularDamping_set(swigCPtr, this, value);
\r
172 public float getAngularDamping() {
\r
173 return gdxBulletJNI.btRigidBodyConstructionInfo_angularDamping_get(swigCPtr, this);
\r
176 public void setFriction(float value) {
\r
177 gdxBulletJNI.btRigidBodyConstructionInfo_friction_set(swigCPtr, this, value);
\r
180 public float getFriction() {
\r
181 return gdxBulletJNI.btRigidBodyConstructionInfo_friction_get(swigCPtr, this);
\r
184 public void setRestitution(float value) {
\r
185 gdxBulletJNI.btRigidBodyConstructionInfo_restitution_set(swigCPtr, this, value);
\r
188 public float getRestitution() {
\r
189 return gdxBulletJNI.btRigidBodyConstructionInfo_restitution_get(swigCPtr, this);
\r
192 public void setLinearSleepingThreshold(float value) {
\r
193 gdxBulletJNI.btRigidBodyConstructionInfo_linearSleepingThreshold_set(swigCPtr, this, value);
\r
196 public float getLinearSleepingThreshold() {
\r
197 return gdxBulletJNI.btRigidBodyConstructionInfo_linearSleepingThreshold_get(swigCPtr, this);
\r
200 public void setAngularSleepingThreshold(float value) {
\r
201 gdxBulletJNI.btRigidBodyConstructionInfo_angularSleepingThreshold_set(swigCPtr, this, value);
\r
204 public float getAngularSleepingThreshold() {
\r
205 return gdxBulletJNI.btRigidBodyConstructionInfo_angularSleepingThreshold_get(swigCPtr, this);
\r
208 public void setAdditionalDamping(boolean value) {
\r
209 gdxBulletJNI.btRigidBodyConstructionInfo_additionalDamping_set(swigCPtr, this, value);
\r
212 public boolean getAdditionalDamping() {
\r
213 return gdxBulletJNI.btRigidBodyConstructionInfo_additionalDamping_get(swigCPtr, this);
\r
216 public void setAdditionalDampingFactor(float value) {
\r
217 gdxBulletJNI.btRigidBodyConstructionInfo_additionalDampingFactor_set(swigCPtr, this, value);
\r
220 public float getAdditionalDampingFactor() {
\r
221 return gdxBulletJNI.btRigidBodyConstructionInfo_additionalDampingFactor_get(swigCPtr, this);
\r
224 public void setAdditionalLinearDampingThresholdSqr(float value) {
\r
225 gdxBulletJNI.btRigidBodyConstructionInfo_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
\r
228 public float getAdditionalLinearDampingThresholdSqr() {
\r
229 return gdxBulletJNI.btRigidBodyConstructionInfo_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
\r
232 public void setAdditionalAngularDampingThresholdSqr(float value) {
\r
233 gdxBulletJNI.btRigidBodyConstructionInfo_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
\r
236 public float getAdditionalAngularDampingThresholdSqr() {
\r
237 return gdxBulletJNI.btRigidBodyConstructionInfo_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
\r
240 public void setAdditionalAngularDampingFactor(float value) {
\r
241 gdxBulletJNI.btRigidBodyConstructionInfo_additionalAngularDampingFactor_set(swigCPtr, this, value);
\r
244 public float getAdditionalAngularDampingFactor() {
\r
245 return gdxBulletJNI.btRigidBodyConstructionInfo_additionalAngularDampingFactor_get(swigCPtr, this);
\r
248 private btRigidBodyConstructionInfo(boolean dummy, float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
\r
249 this(gdxBulletJNI.new_btRigidBodyConstructionInfo__SWIG_0(dummy, mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape, localInertia), true);
\r
252 private btRigidBodyConstructionInfo(boolean dummy, float mass, btMotionState motionState, btCollisionShape collisionShape) {
\r
253 this(gdxBulletJNI.new_btRigidBodyConstructionInfo__SWIG_1(dummy, mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape), true);
\r