SHARE
TWEET

Untitled

a guest Jun 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top