X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fengineer.cpp;h=b0296a192d6cbb175b9fd8c3c03e078c14425201;hb=8b7d4054b05002d82338775ac9b4ee764a8560e4;hp=e19c11e063707a8e7e91383a51044e9ce100f8df;hpb=54d520566470a4b21b2a6eac3e2943d6305dcfa1;p=r2c2.git diff --git a/source/engineer/engineer.cpp b/source/engineer/engineer.cpp index e19c11e..b0296a1 100644 --- a/source/engineer/engineer.cpp +++ b/source/engineer/engineer.cpp @@ -230,11 +230,10 @@ void Engineer::tick() camera.apply(); GL::MatrixStack::Push push_mat(GL::MatrixStack::modelview()); - float rot = picking_track->get_endpoint_direction(picking_entry); - Vector pos = picking_track->get_endpoint_position(picking_entry); + Snap sn = picking_track->get_snap_node(picking_entry); - GL::MatrixStack::modelview() *= GL::Matrix::translation(pos.x, pos.y, pos.z+0.03); - GL::MatrixStack::modelview() *= GL::Matrix::rotation(rot+M_PI, 0, 0, 1); + 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); arrow_mesh.draw(); }