コード例 #1
0
 public static bool listedIdentifier(string identifier)
 {
     if (MaterialProperties.materials.Count < 1)
     {
         MaterialProperties.buildMaterialList();
     }
     return(MaterialProperties.materials.ContainsKey(identifier));
 }
コード例 #2
0
 public static MaterialProperties FromIdentifier(string identifier)
 {
     if (MaterialProperties.materials.Count < 1)
     {
         MaterialProperties.buildMaterialList();
     }
     Scientrace.MaterialProperties retmat = MaterialProperties.getMaterial(identifier);
     if (retmat == null)
     {
         throw new ArgumentException("MaterialProperties Identifier \"" + identifier + "\" is unknown.");
     }
     return(retmat);
 }