X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcamera.cpp;h=6ae162aeb77909fca84b20fa8bf9b9ed3389dfef;hb=7cf5ebbc9d91d09d0664598d3fb88606c3307deb;hp=e7c925c99064a8f911a694fb733281f9fcca1e5f;hpb=05d70b38a546f35a7687cae6ae3fcd6ab78898b2;p=libs%2Fgl.git diff --git a/source/camera.cpp b/source/camera.cpp index e7c925c9..6ae162ae 100644 --- a/source/camera.cpp +++ b/source/camera.cpp @@ -36,7 +36,7 @@ void Camera::set_orthographic(float w, float h) update_projection_matrix(); } -void Camera::set_aspect(float a) +void Camera::set_aspect_ratio(float a) { aspect = a; update_projection_matrix(); @@ -68,12 +68,6 @@ void Camera::set_position(const Vector3 &p) update_object_matrix(); } -void Camera::set_up_direction(const Vector3 &u) -{ - up_dir = normalize(u); - update_object_matrix(); -} - void Camera::set_look_direction(const Vector3 &l) { look_dir = normalize(l); @@ -85,6 +79,12 @@ void Camera::look_at(const Vector3 &p) set_look_direction(p-position); } +void Camera::set_up_direction(const Vector3 &u) +{ + up_dir = normalize(u); + update_object_matrix(); +} + void Camera::set_object_matrix(const Matrix &m) { position = m.column(3).slice<3>(0);