Home | History | Annotate | Download | only in dynamics
      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 btRigidBody extends btCollisionObject {
     20 	private long swigCPtr;
     21 
     22 	protected btRigidBody(final String className, long cPtr, boolean cMemoryOwn) {
     23 		super(className, DynamicsJNI.btRigidBody_SWIGUpcast(cPtr), cMemoryOwn);
     24 		swigCPtr = cPtr;
     25 	}
     26 
     27 	/** Construct a new btRigidBody, normally you should not need this constructor it's intended for low-level usage. */
     28 	public btRigidBody(long cPtr, boolean cMemoryOwn) {
     29 		this("btRigidBody", cPtr, cMemoryOwn);
     30 		construct();
     31 	}
     32 
     33 	@Override
     34 	protected void reset(long cPtr, boolean cMemoryOwn) {
     35 		if (!destroyed)
     36 			destroy();
     37 		super.reset(DynamicsJNI.btRigidBody_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
     38 	}
     39 
     40 	public static long getCPtr(btRigidBody obj) {
     41 		return (obj == null) ? 0 : obj.swigCPtr;
     42 	}
     43 
     44 	@Override
     45 	protected void finalize() throws Throwable {
     46 		if (!destroyed)
     47 			destroy();
     48 		super.finalize();
     49 	}
     50 
     51   @Override protected synchronized void delete() {
     52 		if (swigCPtr != 0) {
     53 			if (swigCMemOwn) {
     54 				swigCMemOwn = false;
     55 				DynamicsJNI.delete_btRigidBody(swigCPtr);
     56 			}
     57 			swigCPtr = 0;
     58 		}
     59 		super.delete();
     60 	}
     61 
     62 	protected btMotionState motionState;
     63 
     64 	/** @return The existing instance for the specified pointer, or null if the instance doesn't exist */
     65 	public static btRigidBody getInstance(final long swigCPtr) {
     66 		return (btRigidBody)btCollisionObject.getInstance(swigCPtr);
     67 	}
     68 
     69 	/** @return The existing instance for the specified pointer, or a newly created instance if the instance didn't exist */
     70 	public static btRigidBody getInstance(final long swigCPtr, boolean owner) {
     71 		if (swigCPtr == 0)
     72 			return null;
     73 		btRigidBody result = getInstance(swigCPtr);
     74 		if (result == null)
     75 				result = new btRigidBody(swigCPtr, owner);
     76 		return result;
     77 	}
     78 
     79 	public btRigidBody(btRigidBodyConstructionInfo constructionInfo) {
     80 		this(false, constructionInfo);
     81 		refCollisionShape(constructionInfo.getCollisionShape());
     82 		refMotionState(constructionInfo.getMotionState());
     83 	}
     84 
     85 	public btRigidBody(float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
     86 		this(false, mass, motionState, collisionShape, localInertia);
     87 		refCollisionShape(collisionShape);
     88 		refMotionState(motionState);
     89 	}
     90 
     91 	public btRigidBody(float mass, btMotionState motionState, btCollisionShape collisionShape) {
     92 		this(false, mass, motionState, collisionShape);
     93 		refCollisionShape(collisionShape);
     94 		refMotionState(motionState);
     95 	}
     96 
     97 	public void setMotionState(btMotionState motionState) {
     98 		refMotionState(motionState);
     99 		internalSetMotionState(motionState);
    100 	}
    101 
    102 	protected void refMotionState(btMotionState motionState) {
    103 		if (this.motionState == motionState)
    104 			return;
    105 		if (this.motionState != null)
    106 			this.motionState.release();
    107 		this.motionState = motionState;
    108 		if (this.motionState != null)
    109 			this.motionState.obtain();
    110 	}
    111 
    112 	public btMotionState getMotionState() {
    113 		return motionState;
    114 	}
    115 
    116 	@Override
    117 	public void dispose() {
    118 		if (motionState != null)
    119 			motionState.release();
    120 		motionState = null;
    121 		super.dispose();
    122 	}
    123 
    124   static public class btRigidBodyConstructionInfo extends BulletBase {
    125   	private long swigCPtr;
    126 
    127   	protected btRigidBodyConstructionInfo(final String className, long cPtr, boolean cMemoryOwn) {
    128   		super(className, cPtr, cMemoryOwn);
    129   		swigCPtr = cPtr;
    130   	}
    131 
    132   	/** Construct a new btRigidBodyConstructionInfo, normally you should not need this constructor it's intended for low-level usage. */
    133   	public btRigidBodyConstructionInfo(long cPtr, boolean cMemoryOwn) {
    134   		this("btRigidBodyConstructionInfo", cPtr, cMemoryOwn);
    135   		construct();
    136   	}
    137 
    138   	@Override
    139   	protected void reset(long cPtr, boolean cMemoryOwn) {
    140   		if (!destroyed)
    141   			destroy();
    142   		super.reset(swigCPtr = cPtr, cMemoryOwn);
    143   	}
    144 
    145   	public static long getCPtr(btRigidBodyConstructionInfo obj) {
    146   		return (obj == null) ? 0 : obj.swigCPtr;
    147   	}
    148 
    149   	@Override
    150   	protected void finalize() throws Throwable {
    151   		if (!destroyed)
    152   			destroy();
    153   		super.finalize();
    154   	}
    155 
    156     @Override protected synchronized void delete() {
    157   		if (swigCPtr != 0) {
    158   			if (swigCMemOwn) {
    159   				swigCMemOwn = false;
    160   				DynamicsJNI.delete_btRigidBody_btRigidBodyConstructionInfo(swigCPtr);
    161   			}
    162   			swigCPtr = 0;
    163   		}
    164   		super.delete();
    165   	}
    166 
    167   	protected btMotionState motionState;
    168 
    169   	public void setMotionState(btMotionState motionState) {
    170   		refMotionState(motionState);
    171   		setI_motionState(motionState);
    172   	}
    173 
    174   	protected void refMotionState(btMotionState motionState) {
    175   		if (this.motionState == motionState)
    176   			return;
    177   		if (this.motionState != null)
    178   			this.motionState.release();
    179   		this.motionState = motionState;
    180   		if (this.motionState != null)
    181   			this.motionState.obtain();
    182   	}
    183 
    184   	public btMotionState getMotionState() {
    185   		return motionState;
    186   	}
    187 
    188   	protected btCollisionShape collisionShape;
    189 
    190   	public void setCollisionShape(btCollisionShape collisionShape) {
    191   		refCollisionShape(collisionShape);
    192   		setI_collisionShape(collisionShape);
    193   	}
    194 
    195   	protected void refCollisionShape(btCollisionShape shape) {
    196   		if (collisionShape == shape)
    197   			return;
    198   		if (collisionShape != null)
    199   			collisionShape.release();
    200   		collisionShape = shape;
    201   		if (collisionShape != null)
    202   			collisionShape.obtain();
    203   	}
    204 
    205   	public btCollisionShape getCollisionShape() {
    206   		return collisionShape;
    207   	}
    208 
    209   	public btRigidBodyConstructionInfo(float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
    210   		this(false, mass, motionState, collisionShape, localInertia);
    211   		refMotionState(motionState);
    212   		refCollisionShape(collisionShape);
    213   	}
    214 
    215   	public btRigidBodyConstructionInfo(float mass, btMotionState motionState, btCollisionShape collisionShape) {
    216   		this(false, mass, motionState, collisionShape);
    217   		refMotionState(motionState);
    218   		refCollisionShape(collisionShape);
    219   	}
    220 
    221   	@Override
    222   	public void dispose() {
    223   		if (motionState != null)
    224   			motionState.release();
    225   		motionState = null;
    226   		if (collisionShape != null)
    227   			collisionShape.release();
    228   		collisionShape = null;
    229   		super.dispose();
    230   	}
    231 
    232     public void setMass(float value) {
    233       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_mass_set(swigCPtr, this, value);
    234     }
    235 
    236     public float getMass() {
    237       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_mass_get(swigCPtr, this);
    238     }
    239 
    240     private void setI_motionState(btMotionState value) {
    241       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_i_motionState_set(swigCPtr, this, btMotionState.getCPtr(value), value);
    242     }
    243 
    244     private btMotionState getI_motionState() {
    245       long cPtr = DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_i_motionState_get(swigCPtr, this);
    246       return (cPtr == 0) ? null : new btMotionState(cPtr, false);
    247     }
    248 
    249     public void setStartWorldTransform(btTransform value) {
    250       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_startWorldTransform_set(swigCPtr, this, btTransform.getCPtr(value), value);
    251     }
    252 
    253     public btTransform getStartWorldTransform() {
    254       long cPtr = DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_startWorldTransform_get(swigCPtr, this);
    255       return (cPtr == 0) ? null : new btTransform(cPtr, false);
    256     }
    257 
    258     private void setI_collisionShape(btCollisionShape value) {
    259       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_i_collisionShape_set(swigCPtr, this, btCollisionShape.getCPtr(value), value);
    260     }
    261 
    262     private btCollisionShape getI_collisionShape() {
    263       long cPtr = DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_i_collisionShape_get(swigCPtr, this);
    264       return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
    265     }
    266 
    267     public void setLocalInertia(btVector3 value) {
    268       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_localInertia_set(swigCPtr, this, btVector3.getCPtr(value), value);
    269     }
    270 
    271     public btVector3 getLocalInertia() {
    272       long cPtr = DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_localInertia_get(swigCPtr, this);
    273       return (cPtr == 0) ? null : new btVector3(cPtr, false);
    274     }
    275 
    276     public void setLinearDamping(float value) {
    277       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_linearDamping_set(swigCPtr, this, value);
    278     }
    279 
    280     public float getLinearDamping() {
    281       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_linearDamping_get(swigCPtr, this);
    282     }
    283 
    284     public void setAngularDamping(float value) {
    285       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_angularDamping_set(swigCPtr, this, value);
    286     }
    287 
    288     public float getAngularDamping() {
    289       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_angularDamping_get(swigCPtr, this);
    290     }
    291 
    292     public void setFriction(float value) {
    293       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_friction_set(swigCPtr, this, value);
    294     }
    295 
    296     public float getFriction() {
    297       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_friction_get(swigCPtr, this);
    298     }
    299 
    300     public void setRollingFriction(float value) {
    301       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_rollingFriction_set(swigCPtr, this, value);
    302     }
    303 
    304     public float getRollingFriction() {
    305       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_rollingFriction_get(swigCPtr, this);
    306     }
    307 
    308     public void setRestitution(float value) {
    309       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_restitution_set(swigCPtr, this, value);
    310     }
    311 
    312     public float getRestitution() {
    313       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_restitution_get(swigCPtr, this);
    314     }
    315 
    316     public void setLinearSleepingThreshold(float value) {
    317       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_linearSleepingThreshold_set(swigCPtr, this, value);
    318     }
    319 
    320     public float getLinearSleepingThreshold() {
    321       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_linearSleepingThreshold_get(swigCPtr, this);
    322     }
    323 
    324     public void setAngularSleepingThreshold(float value) {
    325       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_angularSleepingThreshold_set(swigCPtr, this, value);
    326     }
    327 
    328     public float getAngularSleepingThreshold() {
    329       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_angularSleepingThreshold_get(swigCPtr, this);
    330     }
    331 
    332     public void setAdditionalDamping(boolean value) {
    333       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalDamping_set(swigCPtr, this, value);
    334     }
    335 
    336     public boolean getAdditionalDamping() {
    337       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalDamping_get(swigCPtr, this);
    338     }
    339 
    340     public void setAdditionalDampingFactor(float value) {
    341       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalDampingFactor_set(swigCPtr, this, value);
    342     }
    343 
    344     public float getAdditionalDampingFactor() {
    345       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalDampingFactor_get(swigCPtr, this);
    346     }
    347 
    348     public void setAdditionalLinearDampingThresholdSqr(float value) {
    349       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
    350     }
    351 
    352     public float getAdditionalLinearDampingThresholdSqr() {
    353       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
    354     }
    355 
    356     public void setAdditionalAngularDampingThresholdSqr(float value) {
    357       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
    358     }
    359 
    360     public float getAdditionalAngularDampingThresholdSqr() {
    361       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
    362     }
    363 
    364     public void setAdditionalAngularDampingFactor(float value) {
    365       DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalAngularDampingFactor_set(swigCPtr, this, value);
    366     }
    367 
    368     public float getAdditionalAngularDampingFactor() {
    369       return DynamicsJNI.btRigidBody_btRigidBodyConstructionInfo_additionalAngularDampingFactor_get(swigCPtr, this);
    370     }
    371 
    372     private btRigidBodyConstructionInfo(boolean dummy, float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
    373       this(DynamicsJNI.new_btRigidBody_btRigidBodyConstructionInfo__SWIG_0(dummy, mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape, localInertia), true);
    374     }
    375 
    376     private btRigidBodyConstructionInfo(boolean dummy, float mass, btMotionState motionState, btCollisionShape collisionShape) {
    377       this(DynamicsJNI.new_btRigidBody_btRigidBodyConstructionInfo__SWIG_1(dummy, mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape), true);
    378     }
    379 
    380   }
    381 
    382   public void proceedToTransform(Matrix4 newTrans) {
    383     DynamicsJNI.btRigidBody_proceedToTransform(swigCPtr, this, newTrans);
    384   }
    385 
    386   public void predictIntegratedTransform(float step, Matrix4 predictedTransform) {
    387     DynamicsJNI.btRigidBody_predictIntegratedTransform(swigCPtr, this, step, predictedTransform);
    388   }
    389 
    390   public void saveKinematicState(float step) {
    391     DynamicsJNI.btRigidBody_saveKinematicState(swigCPtr, this, step);
    392   }
    393 
    394   public void applyGravity() {
    395     DynamicsJNI.btRigidBody_applyGravity(swigCPtr, this);
    396   }
    397 
    398   public void setGravity(Vector3 acceleration) {
    399     DynamicsJNI.btRigidBody_setGravity(swigCPtr, this, acceleration);
    400   }
    401 
    402   public Vector3 getGravity() {
    403 	return DynamicsJNI.btRigidBody_getGravity(swigCPtr, this);
    404 }
    405 
    406   public void setDamping(float lin_damping, float ang_damping) {
    407     DynamicsJNI.btRigidBody_setDamping(swigCPtr, this, lin_damping, ang_damping);
    408   }
    409 
    410   public float getLinearDamping() {
    411     return DynamicsJNI.btRigidBody_getLinearDamping(swigCPtr, this);
    412   }
    413 
    414   public float getAngularDamping() {
    415     return DynamicsJNI.btRigidBody_getAngularDamping(swigCPtr, this);
    416   }
    417 
    418   public float getLinearSleepingThreshold() {
    419     return DynamicsJNI.btRigidBody_getLinearSleepingThreshold(swigCPtr, this);
    420   }
    421 
    422   public float getAngularSleepingThreshold() {
    423     return DynamicsJNI.btRigidBody_getAngularSleepingThreshold(swigCPtr, this);
    424   }
    425 
    426   public void applyDamping(float timeStep) {
    427     DynamicsJNI.btRigidBody_applyDamping(swigCPtr, this, timeStep);
    428   }
    429 
    430   public void setMassProps(float mass, Vector3 inertia) {
    431     DynamicsJNI.btRigidBody_setMassProps(swigCPtr, this, mass, inertia);
    432   }
    433 
    434   public Vector3 getLinearFactor() {
    435 	return DynamicsJNI.btRigidBody_getLinearFactor(swigCPtr, this);
    436 }
    437 
    438   public void setLinearFactor(Vector3 linearFactor) {
    439     DynamicsJNI.btRigidBody_setLinearFactor(swigCPtr, this, linearFactor);
    440   }
    441 
    442   public float getInvMass() {
    443     return DynamicsJNI.btRigidBody_getInvMass(swigCPtr, this);
    444   }
    445 
    446   public Matrix3 getInvInertiaTensorWorld() {
    447 	return DynamicsJNI.btRigidBody_getInvInertiaTensorWorld(swigCPtr, this);
    448 }
    449 
    450   public void integrateVelocities(float step) {
    451     DynamicsJNI.btRigidBody_integrateVelocities(swigCPtr, this, step);
    452   }
    453 
    454   public void setCenterOfMassTransform(Matrix4 xform) {
    455     DynamicsJNI.btRigidBody_setCenterOfMassTransform(swigCPtr, this, xform);
    456   }
    457 
    458   public void applyCentralForce(Vector3 force) {
    459     DynamicsJNI.btRigidBody_applyCentralForce(swigCPtr, this, force);
    460   }
    461 
    462   public Vector3 getTotalForce() {
    463 	return DynamicsJNI.btRigidBody_getTotalForce(swigCPtr, this);
    464 }
    465 
    466   public Vector3 getTotalTorque() {
    467 	return DynamicsJNI.btRigidBody_getTotalTorque(swigCPtr, this);
    468 }
    469 
    470   public Vector3 getInvInertiaDiagLocal() {
    471 	return DynamicsJNI.btRigidBody_getInvInertiaDiagLocal(swigCPtr, this);
    472 }
    473 
    474   public void setInvInertiaDiagLocal(Vector3 diagInvInertia) {
    475     DynamicsJNI.btRigidBody_setInvInertiaDiagLocal(swigCPtr, this, diagInvInertia);
    476   }
    477 
    478   public void setSleepingThresholds(float linear, float angular) {
    479     DynamicsJNI.btRigidBody_setSleepingThresholds(swigCPtr, this, linear, angular);
    480   }
    481 
    482   public void applyTorque(Vector3 torque) {
    483     DynamicsJNI.btRigidBody_applyTorque(swigCPtr, this, torque);
    484   }
    485 
    486   public void applyForce(Vector3 force, Vector3 rel_pos) {
    487     DynamicsJNI.btRigidBody_applyForce(swigCPtr, this, force, rel_pos);
    488   }
    489 
    490   public void applyCentralImpulse(Vector3 impulse) {
    491     DynamicsJNI.btRigidBody_applyCentralImpulse(swigCPtr, this, impulse);
    492   }
    493 
    494   public void applyTorqueImpulse(Vector3 torque) {
    495     DynamicsJNI.btRigidBody_applyTorqueImpulse(swigCPtr, this, torque);
    496   }
    497 
    498   public void applyImpulse(Vector3 impulse, Vector3 rel_pos) {
    499     DynamicsJNI.btRigidBody_applyImpulse(swigCPtr, this, impulse, rel_pos);
    500   }
    501 
    502   public void clearForces() {
    503     DynamicsJNI.btRigidBody_clearForces(swigCPtr, this);
    504   }
    505 
    506   public void updateInertiaTensor() {
    507     DynamicsJNI.btRigidBody_updateInertiaTensor(swigCPtr, this);
    508   }
    509 
    510   public Vector3 getCenterOfMassPosition() {
    511 	return DynamicsJNI.btRigidBody_getCenterOfMassPosition(swigCPtr, this);
    512 }
    513 
    514   public Quaternion getOrientation() {
    515 	return DynamicsJNI.btRigidBody_getOrientation(swigCPtr, this);
    516 }
    517 
    518   public Matrix4 getCenterOfMassTransform() {
    519 	return DynamicsJNI.btRigidBody_getCenterOfMassTransform(swigCPtr, this);
    520 }
    521 
    522   public Vector3 getLinearVelocity() {
    523 	return DynamicsJNI.btRigidBody_getLinearVelocity(swigCPtr, this);
    524 }
    525 
    526   public Vector3 getAngularVelocity() {
    527 	return DynamicsJNI.btRigidBody_getAngularVelocity(swigCPtr, this);
    528 }
    529 
    530   public void setLinearVelocity(Vector3 lin_vel) {
    531     DynamicsJNI.btRigidBody_setLinearVelocity(swigCPtr, this, lin_vel);
    532   }
    533 
    534   public void setAngularVelocity(Vector3 ang_vel) {
    535     DynamicsJNI.btRigidBody_setAngularVelocity(swigCPtr, this, ang_vel);
    536   }
    537 
    538   public Vector3 getVelocityInLocalPoint(Vector3 rel_pos) {
    539 	return DynamicsJNI.btRigidBody_getVelocityInLocalPoint(swigCPtr, this, rel_pos);
    540 }
    541 
    542   public void translate(Vector3 v) {
    543     DynamicsJNI.btRigidBody_translate(swigCPtr, this, v);
    544   }
    545 
    546   public void getAabb(Vector3 aabbMin, Vector3 aabbMax) {
    547     DynamicsJNI.btRigidBody_getAabb(swigCPtr, this, aabbMin, aabbMax);
    548   }
    549 
    550   public float computeImpulseDenominator(Vector3 pos, Vector3 normal) {
    551     return DynamicsJNI.btRigidBody_computeImpulseDenominator(swigCPtr, this, pos, normal);
    552   }
    553 
    554   public float computeAngularImpulseDenominator(Vector3 axis) {
    555     return DynamicsJNI.btRigidBody_computeAngularImpulseDenominator(swigCPtr, this, axis);
    556   }
    557 
    558   public void updateDeactivation(float timeStep) {
    559     DynamicsJNI.btRigidBody_updateDeactivation(swigCPtr, this, timeStep);
    560   }
    561 
    562   public boolean wantsSleeping() {
    563     return DynamicsJNI.btRigidBody_wantsSleeping(swigCPtr, this);
    564   }
    565 
    566   public btBroadphaseProxy getBroadphaseProxy() {
    567 	return btBroadphaseProxy.internalTemp(DynamicsJNI.btRigidBody_getBroadphaseProxy__SWIG_0(swigCPtr, this), false);
    568 }
    569 
    570   public void setNewBroadphaseProxy(btBroadphaseProxy broadphaseProxy) {
    571     DynamicsJNI.btRigidBody_setNewBroadphaseProxy(swigCPtr, this, btBroadphaseProxy.getCPtr(broadphaseProxy), broadphaseProxy);
    572   }
    573 
    574   private btMotionState internalGetMotionState() {
    575     long cPtr = DynamicsJNI.btRigidBody_internalGetMotionState__SWIG_0(swigCPtr, this);
    576     return (cPtr == 0) ? null : new btMotionState(cPtr, false);
    577   }
    578 
    579   private void internalSetMotionState(btMotionState motionState) {
    580     DynamicsJNI.btRigidBody_internalSetMotionState(swigCPtr, this, btMotionState.getCPtr(motionState), motionState);
    581   }
    582 
    583   public void setContactSolverType(int value) {
    584     DynamicsJNI.btRigidBody_contactSolverType_set(swigCPtr, this, value);
    585   }
    586 
    587   public int getContactSolverType() {
    588     return DynamicsJNI.btRigidBody_contactSolverType_get(swigCPtr, this);
    589   }
    590 
    591   public void setFrictionSolverType(int value) {
    592     DynamicsJNI.btRigidBody_frictionSolverType_set(swigCPtr, this, value);
    593   }
    594 
    595   public int getFrictionSolverType() {
    596     return DynamicsJNI.btRigidBody_frictionSolverType_get(swigCPtr, this);
    597   }
    598 
    599   public void setAngularFactor(Vector3 angFac) {
    600     DynamicsJNI.btRigidBody_setAngularFactor__SWIG_0(swigCPtr, this, angFac);
    601   }
    602 
    603   public void setAngularFactor(float angFac) {
    604     DynamicsJNI.btRigidBody_setAngularFactor__SWIG_1(swigCPtr, this, angFac);
    605   }
    606 
    607   public Vector3 getAngularFactor() {
    608 	return DynamicsJNI.btRigidBody_getAngularFactor(swigCPtr, this);
    609 }
    610 
    611   public boolean isInWorld() {
    612     return DynamicsJNI.btRigidBody_isInWorld(swigCPtr, this);
    613   }
    614 
    615   public void addConstraintRef(btTypedConstraint c) {
    616     DynamicsJNI.btRigidBody_addConstraintRef(swigCPtr, this, btTypedConstraint.getCPtr(c), c);
    617   }
    618 
    619   public void removeConstraintRef(btTypedConstraint c) {
    620     DynamicsJNI.btRigidBody_removeConstraintRef(swigCPtr, this, btTypedConstraint.getCPtr(c), c);
    621   }
    622 
    623   public btTypedConstraint getConstraintRef(int index) {
    624     long cPtr = DynamicsJNI.btRigidBody_getConstraintRef(swigCPtr, this, index);
    625     return (cPtr == 0) ? null : new btTypedConstraint(cPtr, false);
    626   }
    627 
    628   public int getNumConstraintRefs() {
    629     return DynamicsJNI.btRigidBody_getNumConstraintRefs(swigCPtr, this);
    630   }
    631 
    632   public void setFlags(int flags) {
    633     DynamicsJNI.btRigidBody_setFlags(swigCPtr, this, flags);
    634   }
    635 
    636   public int getFlags() {
    637     return DynamicsJNI.btRigidBody_getFlags(swigCPtr, this);
    638   }
    639 
    640   public Vector3 computeGyroscopicImpulseImplicit_World(float dt) {
    641 	return DynamicsJNI.btRigidBody_computeGyroscopicImpulseImplicit_World(swigCPtr, this, dt);
    642 }
    643 
    644   public Vector3 computeGyroscopicImpulseImplicit_Body(float step) {
    645 	return DynamicsJNI.btRigidBody_computeGyroscopicImpulseImplicit_Body(swigCPtr, this, step);
    646 }
    647 
    648   public Vector3 computeGyroscopicForceExplicit(float maxGyroscopicForce) {
    649 	return DynamicsJNI.btRigidBody_computeGyroscopicForceExplicit(swigCPtr, this, maxGyroscopicForce);
    650 }
    651 
    652   public Vector3 getLocalInertia() {
    653 	return DynamicsJNI.btRigidBody_getLocalInertia(swigCPtr, this);
    654 }
    655 
    656   private btRigidBody(boolean dummy, btRigidBody.btRigidBodyConstructionInfo constructionInfo) {
    657     this(DynamicsJNI.new_btRigidBody__SWIG_0(dummy, btRigidBody.btRigidBodyConstructionInfo.getCPtr(constructionInfo), constructionInfo), true);
    658   }
    659 
    660   private btRigidBody(boolean dummy, float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
    661     this(DynamicsJNI.new_btRigidBody__SWIG_1(dummy, mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape, localInertia), true);
    662   }
    663 
    664   private btRigidBody(boolean dummy, float mass, btMotionState motionState, btCollisionShape collisionShape) {
    665     this(DynamicsJNI.new_btRigidBody__SWIG_2(dummy, mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape), true);
    666   }
    667 
    668 }
    669