InstrinctDef.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #pragma once
  2. #include "../CommonDef.h"
  3. namespace hybridclr
  4. {
  5. namespace interpreter
  6. {
  7. struct HtVector2f
  8. {
  9. float x;
  10. float y;
  11. };
  12. static_assert(sizeof(HtVector2f) == 8, "Vector2f");
  13. struct HtVector3f
  14. {
  15. float x;
  16. float y;
  17. float z;
  18. };
  19. static_assert(sizeof(HtVector3f) == 12, "Vector3f");
  20. struct HtVector4f
  21. {
  22. float x;
  23. float y;
  24. float z;
  25. float w;
  26. };
  27. static_assert(sizeof(HtVector4f) == 16, "Vector4f");
  28. struct HtVector2d
  29. {
  30. double x;
  31. double y;
  32. };
  33. static_assert(sizeof(HtVector2d) == 16, "Vector2d");
  34. struct HtVector3d
  35. {
  36. double x;
  37. double y;
  38. double z;
  39. };
  40. static_assert(sizeof(HtVector3d) == 24, "Vector3d");
  41. struct HtVector4d
  42. {
  43. double x;
  44. double y;
  45. double z;
  46. double w;
  47. };
  48. static_assert(sizeof(HtVector4d) == 32, "Vector4d");
  49. struct HtVector2i
  50. {
  51. int32_t x;
  52. int32_t y;
  53. };
  54. static_assert(sizeof(HtVector2i) == 8, "IntVector2i");
  55. struct HtVector3i
  56. {
  57. int32_t x;
  58. int32_t y;
  59. int32_t z;
  60. };
  61. static_assert(sizeof(HtVector3i) == 12, "IntVector3i");
  62. struct HtVector4i
  63. {
  64. int32_t x;
  65. int32_t y;
  66. int32_t z;
  67. int32_t w;
  68. };
  69. static_assert(sizeof(HtVector4i) == 16, "IntVector4i");
  70. #pragma endregion
  71. }
  72. }