Advertisement
Ember

Typedefs

May 28th, 2015
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.62 KB | None | 0 0
  1. //-------------------------------------------------------------------------------------
  2. // Vectors
  3. //-------------------------------------------------------------------------------------
  4.  
  5. //-------------------------------------------------------------------------------------
  6. // 2D Vector; 8-bit signed integer components
  7. typedef Vector2<Byte> Byte2;
  8. // 3D Vector; 8-bit signed integer components
  9. typedef Vector3<Byte> Byte3;
  10. // 4D Vector; 8-bit signed integer components
  11. typedef Vector4<Byte> Byte4;
  12. //-------------------------------------------------------------------------------------
  13. // 2D Vector; 8-bit unsigned integer components
  14. typedef Vector2<UByte> UByte2;
  15. // 3D Vector; 8-bit unsigned integer components
  16. typedef Vector3<UByte> UByte3;
  17. // 4D Vector; 8-bit unsigned integer components
  18. typedef Vector4<UByte> UByte4;
  19.  
  20. //-------------------------------------------------------------------------------------
  21. // 2D Vector; 16-bit signed integer components
  22. typedef Vector2<Short> Short2;
  23. // 3D Vector; 16-bit signed integer components
  24. typedef Vector3<Short> Short3;
  25. // 4D Vector; 16-bit signed integer components
  26. typedef Vector4<Short> Short4;
  27. //-------------------------------------------------------------------------------------
  28. // 2D Vector; 16-bit unsigned integer components
  29. typedef Vector2<UShort> UShort2;
  30. // 3D Vector; 16-bit unsigned integer components
  31. typedef Vector3<UShort> UShort3;
  32. // 4D Vector; 16-bit unsigned integer components
  33. typedef Vector4<UShort> UShort4;
  34.  
  35. //-------------------------------------------------------------------------------------
  36. // 2D Vector; 32-bit signed integer components
  37. typedef Vector2<Int> Int2;
  38. // 3D Vector; 32-bit signed integer components
  39. typedef Vector3<Int> Int3;
  40. // 4D Vector; 32-bit signed integer components
  41. typedef Vector4<Int> Int4;
  42. //-------------------------------------------------------------------------------------
  43. // 2D Vector; 32-bit unsigned integer components
  44. typedef Vector2<UInt> UInt2;
  45. // 3D Vector; 32-bit unsigned integer components
  46. typedef Vector3<UInt> UInt3;
  47. // 4D Vector; 32-bit unsigned integer components
  48. typedef Vector4<UInt> UInt4;
  49.  
  50. //-------------------------------------------------------------------------------------
  51. // 2D Vector; 16-bit floating-point components
  52. typedef Vector2<Half> Half2;
  53. // 3D Vector; 16-bit floating-point components
  54. typedef Vector3<Half> Half3;
  55. // 4D Vector; 16-bit floating-point components
  56. typedef Vector4<Half> Half4;
  57. //-------------------------------------------------------------------------------------
  58. // 2D Vector; 32-bit floating-point components
  59. typedef Vector2<Float> Float2;
  60. // 3D Vector; 32-bit floating-point components
  61. typedef Vector3<Float> Float3;
  62. // 4D Vector; 32-bit floating-point components aligned to a 16-byte boundary
  63. typedef Align(16) struct Vector4<Float> Float4;
  64. //-------------------------------------------------------------------------------------
  65. // Quaternion; Simply a Float4 renamed to a helper type
  66. typedef Float4 Quaternion;
  67.  
  68. //-------------------------------------------------------------------------------------
  69. // Matrices
  70. //-------------------------------------------------------------------------------------
  71.  
  72. //-------------------------------------------------------------------------------------
  73. // 2x2 Matrix; Two 2D 32-bit floating point vectors aligned to a 16-byte boundary
  74. typedef Align(16) struct Vector2<Float2> Float2x2;
  75. // 2x3 Matrix; Three 2D 32-bit floating point vectors aligned to a 16-byte boundary
  76. typedef Align(16) struct Vector3<Float2> Float2x3;
  77. // 2x4 Matrix; Four 2D 32-bit floating point vectors aligned to a 16-byte boundary
  78. typedef Align(16) struct Vector4<Float2> Float2x4;
  79.  
  80. //-------------------------------------------------------------------------------------
  81. // 3x2 Matrix; Two 3D 32-bit floating point vectors aligned to a 16-byte boundary
  82. typedef Align(16) struct Vector2<Float3> Float3x2;
  83. // 3x3 Matrix; Three 3D 32-bit floating point vectors aligned to a 16-byte boundary
  84. typedef Align(16) struct Vector3<Float3> Float3x3;
  85. // 3x4 Matrix; Three 3D 32-bit floating point vectors aligned to a 16-byte boundary
  86. typedef Align(16) struct Vector4<Float3> Float3x4;
  87.  
  88. //-------------------------------------------------------------------------------------
  89. // 4x2 Matrix; Two 4D 32-bit floating point vectors aligned to a 16-byte boundary
  90. typedef Align(16) struct Vector2<Float4> Float4x2;
  91. // 4x3 Matrix; Three 4D 32-bit floating point vectors aligned to a 16-byte boundary
  92. typedef Align(16) struct Vector3<Float4> Float4x3;
  93. // 4x4 Matrix; Four 4D 32-bit floating point vectors aligned to a 16-byte boundary
  94. typedef Align(16) struct Vector4<Float4> Float4x4;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement