示例#1
0
 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));
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
 public SphereItem()
 {
     Transform = IdentityWord.Identity;
     Material  = new MaterialItem();
 }