XZOrientedQuad3DPoints.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #if UNITY_EDITOR
  2. using UnityEngine;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace O3DWB
  6. {
  7. public static class XZOrientedQuad3DPoints
  8. {
  9. #region Private Static Variables
  10. private static readonly XZOrientedQuad3DPoint[] _quadPoints;
  11. private static readonly int _count;
  12. #endregion
  13. #region Constructors
  14. static XZOrientedQuad3DPoints()
  15. {
  16. _count = Enum.GetValues(typeof(XZOrientedQuad3DPoint)).Length;
  17. _quadPoints = new XZOrientedQuad3DPoint[_count];
  18. _quadPoints[(int)XZOrientedQuad3DPoint.Center] = XZOrientedQuad3DPoint.Center;
  19. _quadPoints[(int)XZOrientedQuad3DPoint.TopLeft] = XZOrientedQuad3DPoint.TopLeft;
  20. _quadPoints[(int)XZOrientedQuad3DPoint.TopRight] = XZOrientedQuad3DPoint.TopRight;
  21. _quadPoints[(int)XZOrientedQuad3DPoint.BottomRight] = XZOrientedQuad3DPoint.BottomRight;
  22. _quadPoints[(int)XZOrientedQuad3DPoint.BottomLeft] = XZOrientedQuad3DPoint.BottomLeft;
  23. }
  24. #endregion
  25. #region Public Static Properties
  26. public static int Count { get { return _count; } }
  27. #endregion
  28. #region Public Static Functions
  29. public static List<XZOrientedQuad3DPoint> GetAll()
  30. {
  31. return new List<XZOrientedQuad3DPoint>(_quadPoints);
  32. }
  33. #endregion
  34. }
  35. }
  36. #endif