Bullet RigidBody : revert IDE autoformatting noise

experimental
Dokthar 10 years ago
parent b1473c302c
commit abbdefdcef
  1. 93
      jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java

@ -51,9 +51,7 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
/** /**
* <p> * <p>PhysicsRigidBody - Basic physics object</p>
* PhysicsRigidBody - Basic physics object</p>
*
* @author normenhansen * @author normenhansen
*/ */
public class PhysicsRigidBody extends PhysicsCollisionObject { public class PhysicsRigidBody extends PhysicsCollisionObject {
@ -68,7 +66,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Creates a new PhysicsRigidBody with the supplied collision shape * Creates a new PhysicsRigidBody with the supplied collision shape
*
* @param child * @param child
* @param shape * @param shape
*/ */
@ -137,7 +134,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Sets the physics object location * Sets the physics object location
*
* @param location the location of the actual physics object * @param location the location of the actual physics object
*/ */
public void setPhysicsLocation(Vector3f location) { public void setPhysicsLocation(Vector3f location) {
@ -148,7 +144,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Sets the physics object rotation * Sets the physics object rotation
*
* @param rotation the rotation of the actual physics object * @param rotation the rotation of the actual physics object
*/ */
public void setPhysicsRotation(Matrix3f rotation) { public void setPhysicsRotation(Matrix3f rotation) {
@ -159,7 +154,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Sets the physics object rotation * Sets the physics object rotation
*
* @param rotation the rotation of the actual physics object * @param rotation the rotation of the actual physics object
*/ */
public void setPhysicsRotation(Quaternion rotation) { public void setPhysicsRotation(Quaternion rotation) {
@ -255,10 +249,9 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
// return Converter.convert(tempTrans.basis, rotation); // return Converter.convert(tempTrans.basis, rotation);
// } // }
/** /**
* Sets the node to kinematic mode. in this mode the node is not affected by * Sets the node to kinematic mode. in this mode the node is not affected by physics
* physics but affects other physics objects. Iits kinetic force is * but affects other physics objects. Iits kinetic force is calculated by the amount
* calculated by the amount of movement it is exposed to and its weight. * of movement it is exposed to and its weight.
*
* @param kinematic * @param kinematic
*/ */
public void setKinematic(boolean kinematic) { public void setKinematic(boolean kinematic) {
@ -279,11 +272,8 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native void setCcdSweptSphereRadius(long objectId, float radius); private native void setCcdSweptSphereRadius(long objectId, float radius);
/** /**
* Sets the amount of motion that has to happen in one physics tick to * Sets the amount of motion that has to happen in one physics tick to trigger the continuous motion detection<br/>
* trigger the continuous motion detection<br/> * This avoids the problem of fast objects moving through other objects, set to zero to disable (default)
* This avoids the problem of fast objects moving through other objects, set
* to zero to disable (default)
*
* @param threshold * @param threshold
*/ */
public void setCcdMotionThreshold(float threshold) { public void setCcdMotionThreshold(float threshold) {
@ -316,7 +306,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Sets the mass of this PhysicsRigidBody, objects with mass=0 are static. * Sets the mass of this PhysicsRigidBody, objects with mass=0 are static.
*
* @param mass * @param mass
*/ */
public void setMass(float mass) { public void setMass(float mass) {
@ -356,9 +345,8 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Set the local gravity of this PhysicsRigidBody<br/> * Set the local gravity of this PhysicsRigidBody<br/>
* Set this after adding the node to the PhysicsSpace, the PhysicsSpace * Set this after adding the node to the PhysicsSpace,
* assigns its current gravity to the physics node when its added. * the PhysicsSpace assigns its current gravity to the physics node when its added.
*
* @param gravity the gravity vector to set * @param gravity the gravity vector to set
*/ */
public void setGravity(Vector3f gravity) { public void setGravity(Vector3f gravity) {
@ -375,7 +363,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Sets the friction of this physics object * Sets the friction of this physics object
*
* @param friction the friction of this physics object * @param friction the friction of this physics object
*/ */
public void setFriction(float friction) { public void setFriction(float friction) {
@ -402,11 +389,10 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
public void setLinearDamping(float linearDamping) { public void setLinearDamping(float linearDamping) {
setDamping(objectId, linearDamping, getAngularDamping()); setDamping(objectId, linearDamping, getAngularDamping());
} }
public void setAngularDamping(float angularDamping) { public void setAngularDamping(float angularDamping) {
setAngularDamping(objectId, angularDamping); setAngularDamping(objectId, angularDamping);
} }
private native void setAngularDamping(long objectId, float factor); private native void setAngularDamping(long objectId, float factor);
public float getLinearDamping() { public float getLinearDamping() {
@ -428,9 +414,7 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native float getRestitution(long objectId); private native float getRestitution(long objectId);
/** /**
* The "bouncyness" of the PhysicsRigidBody, best performance if * The "bouncyness" of the PhysicsRigidBody, best performance if restitution=0
* restitution=0
*
* @param restitution * @param restitution
*/ */
public void setRestitution(float restitution) { public void setRestitution(float restitution) {
@ -441,7 +425,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Get the current angular velocity of this PhysicsRigidBody * Get the current angular velocity of this PhysicsRigidBody
*
* @return the current linear velocity * @return the current linear velocity
*/ */
public Vector3f getAngularVelocity() { public Vector3f getAngularVelocity() {
@ -454,7 +437,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Get the current angular velocity of this PhysicsRigidBody * Get the current angular velocity of this PhysicsRigidBody
*
* @param vec the vector to store the velocity in * @param vec the vector to store the velocity in
*/ */
public void getAngularVelocity(Vector3f vec) { public void getAngularVelocity(Vector3f vec) {
@ -463,7 +445,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Sets the angular velocity of this PhysicsRigidBody * Sets the angular velocity of this PhysicsRigidBody
*
* @param vec the angular velocity of this PhysicsRigidBody * @param vec the angular velocity of this PhysicsRigidBody
*/ */
public void setAngularVelocity(Vector3f vec) { public void setAngularVelocity(Vector3f vec) {
@ -475,7 +456,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Get the current linear velocity of this PhysicsRigidBody * Get the current linear velocity of this PhysicsRigidBody
*
* @return the current linear velocity * @return the current linear velocity
*/ */
public Vector3f getLinearVelocity() { public Vector3f getLinearVelocity() {
@ -488,7 +468,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Get the current linear velocity of this PhysicsRigidBody * Get the current linear velocity of this PhysicsRigidBody
*
* @param vec the vector to store the velocity in * @param vec the vector to store the velocity in
*/ */
public void getLinearVelocity(Vector3f vec) { public void getLinearVelocity(Vector3f vec) {
@ -497,7 +476,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Sets the linear velocity of this PhysicsRigidBody * Sets the linear velocity of this PhysicsRigidBody
*
* @param vec the linear velocity of this PhysicsRigidBody * @param vec the linear velocity of this PhysicsRigidBody
*/ */
public void setLinearVelocity(Vector3f vec) { public void setLinearVelocity(Vector3f vec) {
@ -508,11 +486,9 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native void setLinearVelocity(long objectId, Vector3f vec); private native void setLinearVelocity(long objectId, Vector3f vec);
/** /**
* Apply a force to the PhysicsRigidBody, only applies force if the next * Apply a force to the PhysicsRigidBody, only applies force if the next physics update call
* physics update call updates the physics space.<br> * updates the physics space.<br>
* To apply an impulse, use applyImpulse, use applyContinuousForce to apply * To apply an impulse, use applyImpulse, use applyContinuousForce to apply continuous force.
* continuous force.
*
* @param force the force * @param force the force
* @param location the location of the force * @param location the location of the force
*/ */
@ -524,10 +500,10 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native void applyForce(long objectId, Vector3f force, Vector3f location); private native void applyForce(long objectId, Vector3f force, Vector3f location);
/** /**
* Apply a force to the PhysicsRigidBody, only applies force if the next * Apply a force to the PhysicsRigidBody, only applies force if the next physics update call
* physics update call updates the physics space.<br> * updates the physics space.<br>
* To apply an impulse, use applyImpulse. * To apply an impulse, use applyImpulse.
* *
* @param force the force * @param force the force
*/ */
public void applyCentralForce(Vector3f force) { public void applyCentralForce(Vector3f force) {
@ -538,10 +514,10 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native void applyCentralForce(long objectId, Vector3f force); private native void applyCentralForce(long objectId, Vector3f force);
/** /**
* Apply a force to the PhysicsRigidBody, only applies force if the next * Apply a force to the PhysicsRigidBody, only applies force if the next physics update call
* physics update call updates the physics space.<br> * updates the physics space.<br>
* To apply an impulse, use applyImpulse. * To apply an impulse, use applyImpulse.
* *
* @param torque the torque * @param torque the torque
*/ */
public void applyTorque(Vector3f torque) { public void applyTorque(Vector3f torque) {
@ -553,7 +529,6 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Apply an impulse to the PhysicsRigidBody in the next physics update. * Apply an impulse to the PhysicsRigidBody in the next physics update.
*
* @param impulse applied impulse * @param impulse applied impulse
* @param rel_pos location relative to object * @param rel_pos location relative to object
*/ */
@ -565,9 +540,7 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native void applyImpulse(long objectId, Vector3f impulse, Vector3f rel_pos); private native void applyImpulse(long objectId, Vector3f impulse, Vector3f rel_pos);
/** /**
* Apply a torque impulse to the PhysicsRigidBody in the next physics * Apply a torque impulse to the PhysicsRigidBody in the next physics update.
* update.
*
* @param vec * @param vec
*/ */
public void applyTorqueImpulse(Vector3f vec) { public void applyTorqueImpulse(Vector3f vec) {
@ -579,7 +552,7 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
/** /**
* Clear all forces from the PhysicsRigidBody * Clear all forces from the PhysicsRigidBody
* *
*/ */
public void clearForces() { public void clearForces() {
clearForces(objectId); clearForces(objectId);
@ -603,8 +576,7 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native void setCollisionShape(long objectId, long collisionShapeId); private native void setCollisionShape(long objectId, long collisionShapeId);
/** /**
* reactivates this PhysicsRigidBody when it has been deactivated because it * reactivates this PhysicsRigidBody when it has been deactivated because it was not moving
* was not moving
*/ */
public void activate() { public void activate() {
activate(objectId); activate(objectId);
@ -619,10 +591,8 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
private native boolean isActive(long objectId); private native boolean isActive(long objectId);
/** /**
* sets the sleeping thresholds, these define when the object gets * sets the sleeping thresholds, these define when the object gets deactivated
* deactivated to save ressources. Low values keep the object active when it * to save ressources. Low values keep the object active when it barely moves
* barely moves
*
* @param linear the linear sleeping threshold * @param linear the linear sleeping threshold
* @param angular the angular sleeping threshold * @param angular the angular sleeping threshold
*/ */
@ -676,25 +646,26 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
} }
public void setAngularFactor(Vector3f factor) { public void setAngularFactor(Vector3f factor) {
setAngularFactor(objectId, factor); setAngularFactor(objectId, factor);
} }
private native void setAngularFactor(long objectId, Vector3f factor); private native void setAngularFactor(long objectId, Vector3f factor);
public Vector3f getLinearFactor() { public Vector3f getLinearFactor() {
Vector3f vec = new Vector3f(); Vector3f vec = new Vector3f();
getLinearFactor(objectId, vec); getLinearFactor(objectId, vec);
return vec; return vec;
} }
private native void getLinearFactor(long objectId, Vector3f vec); private native void getLinearFactor(long objectId, Vector3f vec);
public void setLinearFactor(Vector3f factor) { public void setLinearFactor(Vector3f factor) {
setLinearFactor(objectId, factor); setLinearFactor(objectId, factor);
} }
private native void setLinearFactor(long objectId, Vector3f factor); private native void setLinearFactor(long objectId, Vector3f factor);
/** /**
* do not use manually, joints are added automatically * do not use manually, joints are added automatically
*/ */
@ -705,17 +676,15 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
} }
/** /**
* *
*/ */
public void removeJoint(PhysicsJoint joint) { public void removeJoint(PhysicsJoint joint) {
joints.remove(joint); joints.remove(joint);
} }
/** /**
* Returns a list of connected joints. This list is only filled when the * Returns a list of connected joints. This list is only filled when
* PhysicsRigidBody is actually added to the physics space or loaded from * the PhysicsRigidBody is actually added to the physics space or loaded from disk.
* disk.
*
* @return list of active joints connected to this PhysicsRigidBody * @return list of active joints connected to this PhysicsRigidBody
*/ */
public List<PhysicsJoint> getJoints() { public List<PhysicsJoint> getJoints() {

Loading…
Cancel
Save