]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/engineer.cpp
Make use of the mspmath library
[r2c2.git] / source / engineer / engineer.cpp
index b0296a192d6cbb175b9fd8c3c03e078c14425201..ad26e50c46ea087d99175f73a525089ee2b5fd0c 100644 (file)
@@ -232,8 +232,8 @@ void Engineer::tick()
 
                Snap sn = picking_track->get_snap_node(picking_entry);
 
-               GL::MatrixStack::modelview() *= GL::Matrix::translation(sn.position.x, sn.position.y, sn.position.z+0.03);
-               GL::MatrixStack::modelview() *= GL::Matrix::rotation(sn.rotation+M_PI, 0, 0, 1);
+               GL::MatrixStack::modelview() *= GL::Matrix::translation(sn.position+GL::Vector3(0, 0, 0.03));
+               GL::MatrixStack::modelview() *= GL::Matrix::rotation(sn.rotation+Angle::half_turn(), 0, 0, 1);
 
                arrow_mesh.draw();
        }
@@ -313,7 +313,7 @@ void Engineer::view_all()
        float best_score = 0;
        GL::Vector3 pos;
        GL::Vector3 up;
-       for(float angle=0; angle<M_PI; angle+=0.01)
+       for(Angle angle; angle<Angle::half_turn(); angle+=Angle::from_radians(0.01))
        {
                float min_x = 0;
                float max_x = 0;