- OVR::Matrix4f tracking_matrix(head_pose.Rotation);
- OVR::Vector3f trans = head_pose.Translation;
- const float *m = &tracking_matrix.M[0][0];
-
- const GL::Vector3 &base_look = base_camera.get_look_direction();
- GL::Vector3 base_right = normalize(cross(base_look, base_camera.get_up_direction()));
- GL::Vector3 base_up = normalize(cross(base_right, base_look));
-
- set_position(base_camera.get_position()+trans.x*base_right+trans.y*base_up-trans.z*base_look);
- set_up_direction(base_right*m[1]+base_up*m[5]-base_look*m[9]);
- set_look_direction(-base_right*m[2]-base_up*m[6]+base_look*m[10]);
- set_depth_clip(base_camera.get_near_clip(), base_camera.get_far_clip());
- set_field_of_view(base_camera.get_field_of_view());
- set_aspect(base_camera.get_aspect());
+ OVR::Matrix4f tracking_matrix(head_pose);
+ update_from_matrix(transpose(GL::Matrix(&tracking_matrix.M[0][0])));