2
0

Layers.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Utility
  7. * @{
  8. */
  9. /// <summary>
  10. /// Contains a list of layers that can be used for controlling which <see cref="Renderable"/> is output to which
  11. /// camera. A maximum of 64 layers are supported.
  12. /// </summary>
  13. public static class Layers // Note: Placeholder class, need functionality to edit and persist layer names
  14. {
  15. private static string[] names;
  16. private static UInt64[] values;
  17. /// <summary>
  18. /// Returns the names of all available layers.
  19. /// </summary>
  20. public static string[] Names
  21. {
  22. get
  23. {
  24. if (names == null)
  25. {
  26. names = new string[64];
  27. for (int i = 0; i < names.Length; i++)
  28. names[i] = "Layer_" + i;
  29. }
  30. return names;
  31. }
  32. }
  33. /// <summary>
  34. /// Returns the values of all available layers.
  35. /// </summary>
  36. public static UInt64[] Values
  37. {
  38. get
  39. {
  40. if (values == null)
  41. {
  42. values = new UInt64[64];
  43. for (int i = 0; i < values.Length; i++)
  44. values[i] = 1UL << i;
  45. }
  46. return values;
  47. }
  48. }
  49. }
  50. /** @} */
  51. }