From e3abc10ca3fb04d58db22b01f44981841ae39182 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 14 Nov 2017 10:48:37 +0200 Subject: [PATCH] Cosmetic fixes --- source/animation.cpp | 2 +- source/camera.cpp | 12 ++++++------ source/objectinstance.h | 2 -- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/source/animation.cpp b/source/animation.cpp index 8f7dea03..1e2dda90 100644 --- a/source/animation.cpp +++ b/source/animation.cpp @@ -145,7 +145,7 @@ Matrix Animation::MatrixInterpolation::get(float t) const will be in the range [-1, 1]. */ float w = (axes[i].slope+(1-axes[i].slope)*u*u)*u*0.5f+0.5f; - /* The interpolate vectors will also be shorter than unit length. At + /* The interpolated vectors will also be shorter than unit length. At the halfway point the length will be equal to the cosine of half the angle, which was computed earlier. Use a second degree polynomial to approximate. */ diff --git a/source/camera.cpp b/source/camera.cpp index e7c925c9..e15d1cfe 100644 --- a/source/camera.cpp +++ b/source/camera.cpp @@ -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); diff --git a/source/objectinstance.h b/source/objectinstance.h index 273d3485..d85d2db8 100644 --- a/source/objectinstance.h +++ b/source/objectinstance.h @@ -8,8 +8,6 @@ namespace Msp { namespace GL { -class ProgramData; - /** Represents a single instance of an Object. Thanks to being derived from Placeable in can be positioned without additional effort. Other instance -- 2.45.2