Просмотр исходного кода

- remove deprecated methods from RagDollControl
- make PhysicsBoneLink accessible as its the userObject of the collision objects which is accessible for the user elsewhere and has to be dealt with in collision callbacks

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9677 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 13 лет назад
Родитель
Сommit
64cadc1284

+ 10 - 30
engine/src/bullet-common/com/jme3/bullet/control/KinematicRagdollControl.java

@@ -125,14 +125,22 @@ public class KinematicRagdollControl implements PhysicsControl, PhysicsCollision
         Ragdoll
     }
 
-    protected class PhysicsBoneLink {
+    public class PhysicsBoneLink {
 
         protected Bone bone;
+        protected PhysicsRigidBody rigidBody;
         protected Quaternion initalWorldRotation;
         protected SixDofJoint joint;
-        protected PhysicsRigidBody rigidBody;
         protected Quaternion startBlendingRot = new Quaternion();
         protected Vector3f startBlendingPos = new Vector3f();
+
+        public Bone getBone() {
+            return bone;
+        }
+
+        public PhysicsRigidBody getRigidBody() {
+            return rigidBody;
+        }
     }
 
     /**
@@ -824,34 +832,6 @@ public class KinematicRagdollControl implements PhysicsControl, PhysicsCollision
         }
     }
 
-    /**
-     * Set the CcdMotionThreshold of the given bone's rigidBodies of the ragdoll
-     * @see PhysicsRigidBody#setCcdMotionThreshold(float) 
-     * @param value 
-     * @deprecated use getBoneRigidBody(String BoneName).setCcdMotionThreshold(float) instead
-     */
-    @Deprecated
-    public void setBoneCcdMotionThreshold(String boneName, float value) {
-        PhysicsBoneLink link = boneLinks.get(boneName);
-        if (link != null) {
-            link.rigidBody.setCcdMotionThreshold(value);
-        }
-    }
-
-    /**
-     * Set the CcdSweptSphereRadius of the given bone's rigidBodies of the ragdoll
-     * @see PhysicsRigidBody#setCcdSweptSphereRadius(float) 
-     * @param value 
-     * @deprecated use getBoneRigidBody(String BoneName).setCcdSweptSphereRadius(float) instead
-     */
-    @Deprecated
-    public void setBoneCcdSweptSphereRadius(String boneName, float value) {
-        PhysicsBoneLink link = boneLinks.get(boneName);
-        if (link != null) {
-            link.rigidBody.setCcdSweptSphereRadius(value);
-        }
-    }
-
     /**
      * return the rigidBody associated to the given bone
      * @param boneName the name of the bone