interop.h 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 BoundingBox {
  28. Vector3 min, max;
  29. bool defined;
  30. };
  31. struct Plane {
  32. Vector3 normal, absNormal;
  33. float d;
  34. };
  35. struct Matrix3x4 {
  36. float m00;
  37. float m01;
  38. float m02;
  39. float m03;
  40. float m10;
  41. float m11;
  42. float m12;
  43. float m13;
  44. float m20;
  45. float m21;
  46. float m22;
  47. float m23;
  48. };
  49. struct Matrix4 {
  50. float m00;
  51. float m01;
  52. float m02;
  53. float m03;
  54. float m10;
  55. float m11;
  56. float m12;
  57. float m13;
  58. float m20;
  59. float m21;
  60. float m22;
  61. float m23;
  62. float m30;
  63. float m31;
  64. float m32;
  65. float m33;
  66. };
  67. }
  68. #endif