override public void SetValue(string key, StackItem value) { if (key == "transform") { Transform = (MatrixItem)value; } else if (key == "material") { Material = (MaterialItem)value; } else { throw new InvalidOperationException(String.Format("Unknown key: {0}", key)); } }
public bool IsEqual(dynamic rhs) { if (rhs.GetType() == typeof(MaterialItem)) { MaterialItem rhs_m = (MaterialItem)rhs; return(Color == rhs_m.Color && Ambient == rhs_m.Ambient && Diffuse == rhs_m.Diffuse && Specular == rhs_m.Specular && Shininess == rhs_m.Shininess); } else { return(false); } }
public SphereItem() { Transform = IdentityWord.Identity; Material = new MaterialItem(); }