public static void setInBuffer(Vector3f vector, FloatBuffer buf, int index) {
        if (buf == null) {
            return;
        }
        if (vector == null) {
            buf.put(index * 3, 0);
            buf.put((index * 3) + 1, 0);
            buf.put((index * 3) + 2, 0);
        } else {
            buf.put(index * 3, vector.x);
            buf.put((index * 3) + 1, vector.y);
            buf.put((index * 3) + 2, vector.z);
        }
    }
Sets the data contained in the given Vector3F into the FloatBuffer at the
specified index.

@param vector
           the data to insert
@param buf
           the buffer to insert into
@param index
           the position to place the data; in terms of vectors not floats
jme3-core/src/main/java/com/jme3/util/BufferUtils.java