Ember

Float4x4

Mar 11th, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. // 4x4 Matrix; Four 4D 32-bit floating point vectors aligned to a 16-byte boundary
  2. Align(16) struct Float4x4
  3. {
  4.     // Members
  5.     union
  6.     {
  7.         // Swizzle; Lower three values of the vector
  8.         struct { Float4 x; Vector3<Float4>ywz; };
  9.         // Swizzle; Upper three values of the vector
  10.         struct { Vector3<Float4> xyz; Float4 w; };
  11.         // Swizzle; Middle two values of the vector
  12.         struct { Float4 x; Vector2<Float4> yz; Float4 w; };
  13.         // Swizzle; Upper or Lower two values of the vector
  14.         struct { Vector2<Float4> xy; Vector2<Float4> zw; };
  15.         // A single component of the vector
  16.         struct { Float4 x, y, z, w; };
  17.     };
  18. };
Advertisement
Add Comment
Please, Sign In to add comment