public static void setInBuffer(Vector4f vec, FloatBuffer buf, int index) {
        buf.position(index * 4);
        buf.put(vec.getX());
        buf.put(vec.getY());
        buf.put(vec.getZ());
        buf.put(vec.getW());
    }
Sets the data contained in the given vector4 into the FloatBuffer at the
specified index.

@param vec
           the {@link Vector4f} to insert
@param buf
           the buffer to insert into
@param index
           the position to place the data; in terms of vector4 not floats
jme3-core/src/main/java/com/jme3/util/BufferUtils.java