public static Tuple <string, Material> parseMaterial(InputStream inputFile, Scene scene) { string name = inputFile.expectIdentifier(); inputFile.expectSymbol("("); BRDF brdf = parseBRDF(inputFile, scene); inputFile.expectSymbol(","); IPigment emRad = parsePigment(inputFile, scene); inputFile.expectSymbol(")"); return(new Tuple <string, Material>(name, new Material(brdf, emRad))); }
public Material(BRDF? Brdf = null, IPigment? EmittedRadiance = null) { this.brdf = Brdf ?? new DiffuseBRDF(); this.emittedRadiance = EmittedRadiance ?? new UniformPigment(Constant.Black); }