code: public static void exports(Xml root, CollisionFunction function)
      {
          Check.notNull(root);
          Check.notNull(function);
  
          final Xml node = root.createChild(FUNCTION);
          if (function instanceof CollisionFunctionLinear)
          {
              final CollisionFunctionLinear linear = (CollisionFunctionLinear) function;
              node.writeString(TYPE, CollisionFunctionType.LINEAR.name());
              node.writeDouble(A, linear.getA());
              node.writeDouble(B, linear.getB());
          }
          else
          {
              node.writeString(TYPE, String.valueOf(function.getType()));
          }
      }
docs: Export the collision function data as a node.
  
  @param root The node root (must not be <code>null</code>).
  @param function The collision function to export (must not be <code>null</code>).
  @throws LionEngineException If error on writing.