Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct
- {
- vector3 upReference;
- vector3 rightReference;
- vector3 forwardReference;
- vector3 position;
- quaternion orientation;
- float pov;
- } camera_t;
- typedef struct
- {
- float x, y, z, w;
- } quaternion;
- XMMATRIX view_matrix = XMMatrixRotationQuaternion(v_quaterion);
- XMFLOAT4X4 f_view;
- XMStoreFloat4x4(&f_view, view_matrix );
- f_view._41 = m_position.x;
- f_view._42 = m_position.y;
- f_view._43 = m_position.z;
- view_matrix = XMLoadFloat4x4(&f_view);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement