From 64cadc1284191830af4e5955085d84f63a34121c Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 22 Aug 2012 20:18:14 +0000 Subject: [PATCH] - 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 --- .../control/KinematicRagdollControl.java | 40 +++++-------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/engine/src/bullet-common/com/jme3/bullet/control/KinematicRagdollControl.java b/engine/src/bullet-common/com/jme3/bullet/control/KinematicRagdollControl.java index 4410ab895..53857b274 100644 --- a/engine/src/bullet-common/com/jme3/bullet/control/KinematicRagdollControl.java +++ b/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