public float[] toArray(float[] floats) {
        if (floats == null) {
            floats = new float[3];
        }
        floats[0] = x;
        floats[1] = y;
        floats[2] = z;
        return floats;
    }
Copies the vector into the argument. The current instance is unaffected.

@param floats storage for the components (must have length&ge;3) or null
    for a new float[3]
@return an array containing the X, Y, and Z components in that order
    (either <code>floats</code> or a new float[3])
jme3-core/src/main/java/com/jme3/math/Vector3f.java