protected final void createSkeletonGeoms(Joint joint, Node joints, Node wires, Node outlines, List<Joint> deformingJoints) {
        Vector3f start = joint.getModelTransform().getTranslation().clone();

        Vector3f[] ends = null;
        if (!joint.getChildren().isEmpty()) {
            ends = new Vector3f[joint.getChildren().size()];
        }

        for (int i = 0; i < joint.getChildren().size(); i++) {
            ends[i] = joint.getChildren().get(i).getModelTransform().getTranslation().clone();
        }

        boolean deforms = deformingJoints.contains(joint);

        Geometry jGeom = new Geometry(joint.getName() + "Joint", new JointShape());
        jGeom.setLocalTranslation(start);
        attach(joints, deforms, jGeom);
        Geometry bGeom = null;
        Geometry bGeomO = null;
        if (ends == null) {
            geomToJoint.put(jGeom, joint);
        } else {
            Mesh m = null;
            Mesh mO = null;
            Node wireAttach = wires;
            Node outlinesAttach = outlines;
            if (ends.length == 1) {
                m = new Line(start, ends[0]);
                mO = new Line(start, ends[0]);
            } else {
                m = new ArmatureInterJointsWire(start, ends);
                mO = new ArmatureInterJointsWire(start, ends);
                wireAttach = (Node) wires.getChild(1);
                outlinesAttach = null;
            }
            bGeom = new Geometry(joint.getName() + "Bone", m);
            setColor(bGeom, outlinesAttach == null ? outlineColor : baseColor);
            geomToJoint.put(bGeom, joint);
            bGeom.setUserData("start", getWorldTransform().transformVector(start, start));
            for (int i = 0; i < ends.length; i++) {
                getWorldTransform().transformVector(ends[i], ends[i]);
            }
            bGeom.setUserData("end", ends);
            bGeom.setQueueBucket(RenderQueue.Bucket.Transparent);
            attach(wireAttach, deforms, bGeom);
            if (outlinesAttach != null) {
                bGeomO = new Geometry(joint.getName() + "BoneOutline", mO);
                setColor(bGeomO, outlineColor);
                attach(outlinesAttach, deforms, bGeomO);
            }
        }
        jointToGeoms.put(joint, new Geometry[]{jGeom, bGeom, bGeomO});

        for (Joint child : joint.getChildren()) {
            createSkeletonGeoms(child, joints, wires, outlines, deformingJoints);
        }
    }
Creates a wire with bone lengths data. If the data is supplied then the
wires will show each full bone (from head to tail).

@param armature the armature that will be shown
@param joints the Node to visualize joints
@param wires the Node to visualize wires
@param outlines the Node to visualize outlines
@param deformingJoints a list of joints
jme3-core/src/main/java/com/jme3/scene/debug/custom/ArmatureNode.java