Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. typedef struct
  2. {
  3. vector3 upReference;
  4. vector3 rightReference;
  5. vector3 forwardReference;
  6.  
  7. vector3 position;
  8. quaternion orientation;
  9.  
  10. float pov;
  11. } camera_t;
  12.  
  13. typedef struct
  14. {
  15. float x, y, z, w;
  16. } quaternion;
  17.  
  18. XMMATRIX view_matrix = XMMatrixRotationQuaternion(v_quaterion);
  19. XMFLOAT4X4 f_view;
  20. XMStoreFloat4x4(&f_view, view_matrix );
  21. f_view._41 = m_position.x;
  22. f_view._42 = m_position.y;
  23. f_view._43 = m_position.z;
  24. view_matrix = XMLoadFloat4x4(&f_view);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement