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