public SerializableWaveFunctionCollapseFLBuffer(string name, WFCParameterObject parameter) : base(name) { Parameter = parameter; }
public static SerializableFLBuffer CreateBuffer(string name, string[] args, bool force) { if (args.Length < 10) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!int.TryParse(args[2], out int n)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!int.TryParse(args[3], out int widh)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!int.TryParse(args[4], out int heigt)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!bool.TryParse(args[5], out bool periodicInput)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!bool.TryParse(args[6], out bool periodicOutput)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!int.TryParse(args[7], out int symmetry)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!int.TryParse(args[8], out int ground)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } if (!int.TryParse(args[9], out int limit)) { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Define statement"); } string fn = args[1].Trim().Replace("\"", ""); if (IOManager.FileExists(fn)) { SerializableFromFileFLBuffer input = new SerializableFromFileFLBuffer("WFCInputBuffer", fn); WFCParameterObject wfcPO = new WFCParameterObject(input, n, widh, heigt, symmetry, ground, limit, periodicInput, periodicOutput, force); return(new SerializableWaveFunctionCollapseFLBuffer(name, wfcPO)); } else { throw new FLInvalidFunctionUseException("wfc", "Invalid WFC Image statement", new InvalidFilePathException(fn)); } }
public override SerializableFLBuffer CreateBuffer(string name, string[] args) { return(WFCParameterObject.CreateBuffer(name, args, false)); }