@Override
    public void write(JmeExporter e) throws IOException {
        OutputCapsule capsule = e.getCapsule(this);
        capsule.write(origin, "origin", Vector3f.ZERO);
        capsule.write(direction, "direction", Vector3f.ZERO);
    }
Serialize this ray to the specified exporter, for example when
saving to a J3O file.

@param e (not null)
@throws IOException from the exporter
jme3-core/src/main/java/com/jme3/math/Ray.java