GLTFMeshPrimitive.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System.Collections.Generic;
  2. using System.Runtime.Serialization;
  3. namespace GLTFExport.Entities
  4. {
  5. [DataContract]
  6. public class GLTFMeshPrimitive : GLTFProperty
  7. {
  8. public enum FillMode
  9. {
  10. POINTS = 0,
  11. LINES = 1,
  12. LINE_LOOP = 2,
  13. LINE_STRIP = 3,
  14. TRIANGLES = 4,
  15. TRIANGLE_STRIP = 5,
  16. TRIANGLE_FAN = 6
  17. }
  18. public enum Attribute
  19. {
  20. POSITION,
  21. NORMAL,
  22. TANGENT,
  23. TEXCOORD_0,
  24. TEXCOORD_1,
  25. COLOR_0,
  26. JOINTS_0,
  27. WEIGHTS_0
  28. }
  29. [DataMember(IsRequired = true)]
  30. public Dictionary<string, int> attributes { get; set; }
  31. [DataMember(EmitDefaultValue = false)]
  32. public int? indices { get; set; }
  33. [DataMember(EmitDefaultValue = false)]
  34. public FillMode? mode { get; set; }
  35. [DataMember(EmitDefaultValue = false)]
  36. public int? material { get; set; }
  37. //[DataMember]
  38. //public Dictionary<string, int>[] targets { get; set; }
  39. }
  40. }