@Override
    public void write(JmeExporter ex) throws IOException {
        super.write(ex);
        OutputCapsule oc = ex.getCapsule(this);
        oc.write(direction, "direction", new Vector3f());
        oc.write(position, "position", new Vector3f());
        oc.write(spotInnerAngle, "spotInnerAngle", FastMath.QUARTER_PI / 8);
        oc.write(spotOuterAngle, "spotOuterAngle", FastMath.QUARTER_PI / 6);
        oc.write(spotRange, "spotRange", 100);
    }
for internal use only
@return the cosines of the inner and outer angle packed in a float
jme3-core/src/main/java/com/jme3/light/SpotLight.java