private void createTorsoLink(VectorSet vertexLocations, Mesh[] meshes) {
        if (vertexLocations == null || vertexLocations.numVectors() == 0) {
            throw new IllegalArgumentException(
                    "No mesh vertices for the torso."
                    + " Make sure the root bone is not linked.");
        }
        /*
         * Create the CollisionShape.
         */
        Joint bone = RagUtils.findMainBone(skeleton, meshes);
        assert bone.getParent() == null;
        Transform boneToMesh = bone.getModelTransform();
        Transform meshToBone = boneToMesh.invert();
        Vector3f center = vertexLocations.mean(null);
        center.subtractLocal(boneToMesh.getTranslation());
        CollisionShape shape = createShape(meshToBone, center, vertexLocations);

        meshToBone.getTranslation().zero();
        Vector3f offset = meshToBone.transformVector(center, null);

        Transform meshToModel;
        Spatial cgm = getSpatial();
        if (cgm instanceof Node) {
            Transform modelToMesh
                    = RagUtils.relativeTransform(transformer, (Node) cgm, null);
            meshToModel = modelToMesh.invert();
        } else {
            meshToModel = transformIdentity;
        }

        float mass = super.mass(torsoName);
        torsoLink = new TorsoLink(this, bone, shape, mass, meshToModel, offset);
    }
Create the TorsoLink.

@param vertexLocations the set of vertex locations (not null, not empty)
@param meshes array of animated meshes to use (not null, unaffected)
jme3-jbullet/src/main/java/com/jme3/bullet/animation/DacLinks.java