]> git.tdb.fi Git - libs/gl.git/commitdiff
Cosmetic fixes
authorMikko Rasa <tdb@tdb.fi>
Tue, 14 Nov 2017 08:48:37 +0000 (10:48 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 14 Nov 2017 08:48:37 +0000 (10:48 +0200)
source/animation.cpp
source/camera.cpp
source/objectinstance.h

index 8f7dea03bd90e8c8513c5e2ac77379699072ed16..1e2dda900fafc0d580bf84cb648772ccf7747ac3 100644 (file)
@@ -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. */
index e7c925c99064a8f911a694fb733281f9fcca1e5f..e15d1cfe5f8a8107f79ad3cac96717315f2712a7 100644 (file)
@@ -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);
index 273d348579b4b8a34e71d2ebcb33a73f9394c60b..d85d2db895f3e95faa21a7005ec2b4379281f745 100644 (file)
@@ -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