Esempio n. 1
0
 public PmxMaterialAttribute(PmxMaterialAttribute att)
 {
     BumpMapTexture   = att.BumpMapTexture;
     NormalMapTexture = att.NormalMapTexture;
     CubeMapTexture   = att.CubeMapTexture;
     BumpMapUV        = att.BumpMapUV;
     NormalMapUV      = att.NormalMapUV;
     CubeMapUV        = att.CubeMapUV;
 }
Esempio n. 2
0
 public void Clear()
 {
     BumpMapTexture   = null;
     NormalMapTexture = null;
     CubeMapTexture   = null;
     BumpMapUV        = UVTarget.UV;
     NormalMapUV      = UVTarget.UV;
     CubeMapUV        = UVTarget.UV;
 }
Esempio n. 3
0
        private static UVTarget TextToUVTarget(string text)
        {
            UVTarget result = UVTarget.UV;

            switch (text.ToLower())
            {
            case "uva1xy":
                result = UVTarget.UVA1xy;
                break;

            case "uva1zw":
                result = UVTarget.UVA1zw;
                break;

            case "uva2xy":
                result = UVTarget.UVA2xy;
                break;

            case "uva2zw":
                result = UVTarget.UVA2zw;
                break;

            case "uva3xy":
                result = UVTarget.UVA3xy;
                break;

            case "uva3zw":
                result = UVTarget.UVA3zw;
                break;

            case "uva4xy":
                result = UVTarget.UVA4xy;
                break;

            case "uva4zw":
                result = UVTarget.UVA4zw;
                break;
            }
            return(result);
        }
Esempio n. 4
0
 public void SetFromText(string text)
 {
     Clear();
     if (!string.IsNullOrEmpty(text))
     {
         string[] tag = PmxTag.GetTag("BumpMap", text);
         if (tag != null && tag.Length != 0)
         {
             BumpMapTexture = tag[0];
         }
         string[] tag2 = PmxTag.GetTag("BumpMapUV", text);
         if (tag2 != null && tag2.Length != 0)
         {
             BumpMapUV = TextToUVTarget(tag2[0]);
         }
         string[] tag3 = PmxTag.GetTag("NormalMap", text);
         if (tag3 != null && tag3.Length != 0)
         {
             NormalMapTexture = tag3[0];
         }
         string[] tag4 = PmxTag.GetTag("NormalMapUV", text);
         if (tag4 != null && tag4.Length != 0)
         {
             NormalMapUV = TextToUVTarget(tag4[0]);
         }
         string[] tag5 = PmxTag.GetTag("CubeMap", text);
         if (tag5 != null && tag5.Length != 0)
         {
             CubeMapTexture = tag5[0];
         }
         string[] tag6 = PmxTag.GetTag("CubeMapUV", text);
         if (tag6 != null && tag6.Length != 0)
         {
             CubeMapUV = TextToUVTarget(tag6[0]);
         }
     }
 }