Enums.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. using System;
  2. namespace Urho {
  3. [Flags]
  4. public enum ViewOverrideFlags {
  5. None = 0,
  6. LowMaterialQuality = 1,
  7. DisableShadows = 2,
  8. DisableOcclusion = 4
  9. }
  10. public enum LogLevel {
  11. Raw = -1,
  12. Debug = 0,
  13. Info = 1,
  14. Warning = 2,
  15. Error = 3,
  16. None = 4
  17. }
  18. [Flags]
  19. public enum ElementMask : uint {
  20. None = 0x0,
  21. Position = 0x1,
  22. Normal = 0x2,
  23. Color = 0x4,
  24. TexCoord1 = 0x8,
  25. TexCoord2 = 0x10,
  26. CubeTexCoord1 = 0x20,
  27. CubeTexCoord2 = 0x40,
  28. Tangent = 0x80,
  29. BlendWeights = 0x100,
  30. BlendIndices = 0x200,
  31. InstanceMatrix1 = 0x400,
  32. InstanceMatrix2 = 0x800,
  33. InstanceMatrix3 = 0x1000,
  34. Default = 0xffffffff,
  35. }
  36. public enum SoundType {
  37. Master,
  38. Effect,
  39. Ambient,
  40. Voice,
  41. Music
  42. }
  43. public enum DrawableFlags : uint {
  44. Geometry = 0x1,
  45. Light = 0x2,
  46. Zone = 0x4,
  47. Geometry2D = 0x8,
  48. Any = 0xff,
  49. }
  50. public enum Platforms {
  51. Unknown,
  52. Android,
  53. iOS,
  54. Windows,
  55. MacOSX,
  56. Linux,
  57. UWP,
  58. SharpReality
  59. }
  60. public static class PlatformsExtensions
  61. {
  62. public static bool IsMobile(this Platforms platform)
  63. {
  64. return
  65. platform != Platforms.Windows &&
  66. platform != Platforms.Linux &&
  67. platform != Platforms.MacOSX;
  68. }
  69. }
  70. internal static class PlatformsMap
  71. {
  72. public static Platforms FromString(string str)
  73. {
  74. switch (str)
  75. {
  76. // ProcessUtils.cpp:L349
  77. case "Android": return Platforms.Android;
  78. case "iOS": return Platforms.iOS;
  79. case "Windows": return Platforms.Windows;
  80. case "Mac OS X": return Platforms.MacOSX;
  81. case "Linux": return Platforms.Linux;
  82. }
  83. #if UWP_HOLO
  84. return Platforms.SharpReality;
  85. #elif WINDOWS_UWP
  86. return Platforms.UWP;
  87. #endif
  88. return Platforms.Unknown;
  89. }
  90. }
  91. internal enum CallbackType
  92. {
  93. Component_OnSceneSet,
  94. Component_SaveXml,
  95. Component_LoadXml,
  96. Component_AttachedToNode,
  97. Component_OnNodeSetEnabled,
  98. RefCounted_AddRef,
  99. RefCounted_Delete,
  100. Log_Write,
  101. };
  102. }