BabylonMaterial.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using System.Runtime.Serialization;
  2. namespace BabylonExport.Entities
  3. {
  4. [DataContract]
  5. public class BabylonMaterial
  6. {
  7. [DataMember]
  8. public string name { get; set; }
  9. [DataMember]
  10. public string id { get; set; }
  11. [DataMember]
  12. public bool backFaceCulling { get; set; }
  13. [DataMember]
  14. public bool wireframe { get; set; }
  15. [DataMember]
  16. public float[] ambient { get; set; }
  17. [DataMember]
  18. public float[] diffuse { get; set; }
  19. [DataMember]
  20. public float[] specular { get; set; }
  21. [DataMember]
  22. public float[] emissive { get; set; }
  23. [DataMember]
  24. public float specularPower { get; set; }
  25. [DataMember]
  26. public float alpha { get; set; }
  27. [DataMember]
  28. public BabylonTexture diffuseTexture { get; set; }
  29. [DataMember]
  30. public BabylonFresnelParameters diffuseFresnelParameters { get; set; }
  31. [DataMember]
  32. public BabylonTexture ambientTexture { get; set; }
  33. [DataMember]
  34. public BabylonTexture opacityTexture { get; set; }
  35. [DataMember]
  36. public BabylonFresnelParameters opacityFresnelParameters { get; set; }
  37. [DataMember]
  38. public BabylonTexture reflectionTexture { get; set; }
  39. [DataMember]
  40. public BabylonFresnelParameters reflectionFresnelParameters { get; set; }
  41. [DataMember]
  42. public BabylonTexture emissiveTexture { get; set; }
  43. [DataMember]
  44. public BabylonFresnelParameters emissiveFresnelParameters { get; set; }
  45. [DataMember]
  46. public BabylonTexture specularTexture { get; set; }
  47. [DataMember]
  48. public BabylonTexture bumpTexture { get; set; }
  49. public BabylonMaterial()
  50. {
  51. backFaceCulling = true;
  52. ambient = new[] {1.0f, 1.0f, 1.0f};
  53. diffuse = new[] { 1.0f, 1.0f, 1.0f };
  54. specular = new[] { 1.0f, 1.0f, 1.0f };
  55. emissive = new[] { 0f, 0f, 0f };
  56. specularPower = 64;
  57. alpha = 1.0f;
  58. }
  59. }
  60. }