Exemplo n.º 1
0
        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)));
        }
Exemplo n.º 2
0
 public Material(BRDF? Brdf = null, IPigment? EmittedRadiance = null)
 {
     this.brdf = Brdf ?? new DiffuseBRDF();
     this.emittedRadiance = EmittedRadiance ?? new UniformPigment(Constant.Black);
 }