Math.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace AtomicEngine
  4. {
  5. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  6. public struct Vector3
  7. {
  8. public Vector3 (float x, float y, float z)
  9. {
  10. this.x = x;
  11. this.y = y;
  12. this.z = z;
  13. }
  14. public override string ToString()
  15. {
  16. return x + ", " + y + ", " + z;
  17. }
  18. public float x;
  19. public float y;
  20. public float z;
  21. }
  22. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  23. public struct Vector4
  24. {
  25. }
  26. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  27. public struct Vector2
  28. {
  29. }
  30. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  31. public struct Quaternion
  32. {
  33. }
  34. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  35. public struct Color
  36. {
  37. public Color (float r, float g, float b, float a = 1.0f)
  38. {
  39. this.r = r;
  40. this.g = g;
  41. this.b = b;
  42. this.a = a;
  43. }
  44. public float r;
  45. public float g;
  46. public float b;
  47. public float a;
  48. }
  49. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  50. public struct IntRect
  51. {
  52. }
  53. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  54. public struct IntVector2
  55. {
  56. }
  57. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  58. public struct BoundingBox
  59. {
  60. }
  61. [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  62. public struct Rect
  63. {
  64. }}