interop.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //
  2. // Struct defines that we use to cast blittable classes,
  3. // so that the C++ compiler will return a value that our P/Invoke
  4. // layer can consume
  5. //
  6. #ifndef URHO_INTEROP_H
  7. #define URHO_INTEROP_H
  8. namespace Interop {
  9. struct IntVector2 {
  10. int a, b;
  11. };
  12. struct Vector2 {
  13. float x, y;
  14. };
  15. struct Vector3 {
  16. float x, y, z;
  17. };
  18. struct Vector4 {
  19. float x, y, z, w;
  20. };
  21. struct Quaternion {
  22. float w, x, y, z;
  23. };
  24. struct Color {
  25. float r, g, b, a;
  26. };
  27. struct IntRect {
  28. int left, top, right, bottom;
  29. };
  30. struct BoundingBox {
  31. Vector3 min, max;
  32. bool defined;
  33. };
  34. struct Plane {
  35. Vector3 normal, absNormal;
  36. float d;
  37. };
  38. struct Matrix3x4 {
  39. float m00;
  40. float m01;
  41. float m02;
  42. float m03;
  43. float m10;
  44. float m11;
  45. float m12;
  46. float m13;
  47. float m20;
  48. float m21;
  49. float m22;
  50. float m23;
  51. };
  52. struct Matrix4 {
  53. float m00;
  54. float m01;
  55. float m02;
  56. float m03;
  57. float m10;
  58. float m11;
  59. float m12;
  60. float m13;
  61. float m20;
  62. float m21;
  63. float m22;
  64. float m23;
  65. float m30;
  66. float m31;
  67. float m32;
  68. float m33;
  69. };
  70. }
  71. #endif