]> git.tdb.fi Git - libs/vr.git/commitdiff
Fix a warning about a shadowed member variable
authorMikko Rasa <tdb@tdb.fi>
Tue, 4 Oct 2016 08:39:46 +0000 (11:39 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 4 Oct 2016 08:39:46 +0000 (11:39 +0300)
source/headtrackingcamera.cpp

index a296639315634c0f2f4feb689dd988e81746bd49..86d6e24427d1ad2d1b08f9974be5a9b54ac16af8 100644 (file)
@@ -15,12 +15,12 @@ void HeadTrackingCamera::set_elevation_offset(float o)
 
 void HeadTrackingCamera::update_from_matrix(const GL::Matrix &hmd_matrix)
 {
-       const GL::Vector3 &up_dir = base_camera.get_up_direction();
-       GL::Vector3 right_dir = normalize(cross(base_camera.get_look_direction(), up_dir));
+       const GL::Vector3 &up = base_camera.get_up_direction();
+       GL::Vector3 right = normalize(cross(base_camera.get_look_direction(), up));
        GL::Vector4 columns[4];
-       columns[0] = compose(right_dir, 0.0f);
-       columns[1] = compose(up_dir, 0.0f);
-       columns[2] = compose(cross(right_dir, up_dir), 0.0f);
+       columns[0] = compose(right, 0.0f);
+       columns[1] = compose(up, 0.0f);
+       columns[2] = compose(cross(right, up), 0.0f);
        columns[3] = compose(base_camera.get_position(), 1.0f);
        GL::Matrix matrix = GL::Matrix::from_columns(columns)*hmd_matrix;