void addJoint(PhysicsLink parentLink) {
        assert parentLink != null;
        assert getJoint() == null;

        setParent(parentLink);

        Transform parentToWorld = parentLink.physicsTransform(null);
        parentToWorld.setScale(1f);
        Transform worldToParent = parentToWorld.invert();

        Transform childToWorld = physicsTransform(null);
        childToWorld.setScale(1f);

        Transform childToParent = childToWorld.clone();
        childToParent.combineWithParent(worldToParent);

        Spatial transformer = getControl().getTransformer();
        Vector3f pivotMesh = getBone().getModelTransform().getTranslation();
        Vector3f pivotWorld = transformer.localToWorld(pivotMesh, null);

        PhysicsRigidBody parentBody = parentLink.getRigidBody();
        PhysicsRigidBody childBody = getRigidBody();
        Vector3f pivotParent
                = parentToWorld.transformInverseVector(pivotWorld, null);
        Vector3f pivotChild
                = childToWorld.transformInverseVector(pivotWorld, null);
        Matrix3f rotParent = childToParent.getRotation().toRotationMatrix();
        Matrix3f rotChild = matrixIdentity;
        // TODO try HingeJoint or ConeJoint
        SixDofJoint joint = new SixDofJoint(parentBody, childBody, pivotParent,
                pivotChild, rotParent, rotChild, true);
        super.setJoint(joint);

        String name = boneName();
        RangeOfMotion rangeOfMotion = getControl().getJointLimits(name);
        rangeOfMotion.setupJoint(joint);

        joint.setCollisionBetweenLinkedBodys(false);

        assert managedBones == null;
        managedBones = getControl().listManagedBones(name);

        int numManagedBones = managedBones.length;
        startBoneTransforms = new Transform[numManagedBones];
        for (int i = 0; i < numManagedBones; ++i) {
            startBoneTransforms[i] = new Transform();
        }
    }
Add a physics joint to this link and configure its range of motion. Also
initialize the link's parent and its array of managed bones.

@param parentLink (not null, alias created)
jme3-jbullet/src/main/java/com/jme3/bullet/animation/BoneLink.java