]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/layout.cpp
Adapt to changes in vector slicing and composing API
[r2c2.git] / source / 3d / layout.cpp
index f30e427db65d21a81287406c534748f13d46af85..19b59eee6bbf300cc63382749b13e0f564bf6b6f 100644 (file)
@@ -196,9 +196,9 @@ void Layout3D::tick()
                Transform::rotation(Angle::half_turn()-time_of_day, Vector(0, 0, 1))*
                Transform::rotation(axial_tilt, Vector(-1, 0, 0));
        Vector sun_dir = trans.transform_linear(Vector(0, -1, 0));
-       Vector diff = Vector(sun.get_position())-sun_dir;
+       Vector diff = sun.get_position().slice<3>(0)-sun_dir;
        if(diff.norm()>0.0025f)
-               sun.set_position(GL::Vector4(sun_dir, 0.0f));
+               sun.set_position(compose(sun_dir, 0.0f));
 
        double T = 5777;
        double h = 6.62606957e-34;  // Planck constant