public static FloatBuffer createFloatBuffer(Quaternion... data) {
        if (data == null) {
            return null;
        }
        FloatBuffer buff = createFloatBuffer(4 * data.length);
        for (Quaternion element : data) {
            if (element != null) {
                buff.put(element.getX()).put(element.getY()).put(element.getZ()).put(element.getW());
            } else {
                buff.put(0).put(0).put(0).put(0);
            }
        }
        buff.flip();
        return buff;
    }
Generate a new FloatBuffer using the given array of Quaternion objects.
The FloatBuffer will be 4 * data.length long and contain the vector data.

@param data
           array of Quaternion objects to place into a new FloatBuffer
@return a new direct, flipped FloatBuffer, or null if data was null
jme3-core/src/main/java/com/jme3/util/BufferUtils.java