private void setColor(Geometry g, ColorRGBA color) {
        float[] colors = new float[g.getMesh().getVertexCount() * 4];
        for (int i = 0; i < g.getMesh().getVertexCount() * 4; i += 4) {
            colors[i] = color.r;
            colors[i + 1] = color.g;
            colors[i + 2] = color.b;
            colors[i + 3] = color.a;
        }
        VertexBuffer colorBuff = g.getMesh().getBuffer(VertexBuffer.Type.Color);
        if (colorBuff == null) {
            g.getMesh().setBuffer(VertexBuffer.Type.Color, 4, colors);
        } else {
            FloatBuffer cBuff = (FloatBuffer) colorBuff.getData();
            cBuff.rewind();
            cBuff.put(colors);
            colorBuff.updateData(cBuff);
        }
    }
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