public void Dispose() { Name = null; Tex = null; Alpha = null; Bump = null; Color = null; }
internal bool parseParams(string str) { MatchCollection mc = MQORegex.Param.Matches(str); foreach (Match m in mc) { string key = m.Groups["key"].Value; string val = m.Groups["val"].Value; switch (key) { case "tex": Tex = val; break; case "aplane": Alpha = val; break; case "bump": Bump = val; break; case "col": MatchCollection c = MQORegex.Decimal.Matches(val); if (c.Count != 4) return false; Color = new MQOColor(); for (int i = 0; i < 4; i++) Color.SetValue(i, Decimal.Parse(c[i].Groups[0].Value)); break; case "dif": Diffuse = Decimal.Parse(val); break; case "amb": Ambient = Decimal.Parse(val); break; case "emi": Emission = Decimal.Parse(val); break; case "spc": Specular = Decimal.Parse(val); break; case "power": Power = Decimal.Parse(val); break; default: break; } } return true; }
public MQOMaterial(string name) { Name = name; Tex = ""; Alpha = ""; Bump = ""; Color = new MQOColor(); }