]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/camera.cpp
Replace ProgramData copy constructor with a more explicit copy function
[libs/gl.git] / source / render / camera.cpp
index 8f681a74bd19d843130e8bdccea6272e5808d506..3ace92b9ecb7166de54fa20b33f07c943997dae1 100644 (file)
@@ -13,6 +13,23 @@ Camera::Camera()
        update_object_matrix();
 }
 
+void Camera::copy_parameters(const Camera &source)
+{
+       fov = source.fov;
+       height = source.height;
+       aspect = source.aspect;
+       clip_near = source.clip_near;
+       clip_far = source.clip_far;
+       frustum_x = source.frustum_x;
+       frustum_y = source.frustum_y;
+       rotate = source.rotate;
+       position = source.position;
+       look_dir = source.look_dir;
+       up_dir = source.up_dir;
+       update_projection_matrix();
+       update_object_matrix();
+}
+
 void Camera::set_field_of_view(const Geometry::Angle<float> &f)
 {
        fov = f;