X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fvehicle.cpp;h=50dbcb0d693134d969964ba31249bf71e3acc9c7;hb=3fa2b4016a4573be61f48c1dd4162c1dbc3372ba;hp=f14f3c2c238df933943cc938fabffdf6231241f2;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/3d/vehicle.cpp b/source/3d/vehicle.cpp index f14f3c2..50dbcb0 100644 --- a/source/3d/vehicle.cpp +++ b/source/3d/vehicle.cpp @@ -64,6 +64,7 @@ void Vehicle3D::render(const GL::Tag &tag) const { GL::PushMatrix push_mat2; GL::translate(axles[i].position, 0, axles[i].wheel_dia/2); + GL::rotate(vehicle.get_axle_angle(i)*180/M_PI, 0, 1, 0); obj->render(tag); } @@ -80,6 +81,7 @@ void Vehicle3D::render(const GL::Tag &tag) const { GL::PushMatrix push_mat3; GL::translate(bogies[i].axles[j].position, 0, bogies[i].axles[j].wheel_dia/2); + GL::rotate(vehicle.get_bogie_axle_angle(i, j)*180/M_PI, 0, 1, 0); obj->render(tag); } @@ -88,6 +90,20 @@ void Vehicle3D::render(const GL::Tag &tag) const if(const GL::Object *obj = type.get_bogie_object(i)) obj->render(tag); } + + const vector &rods = vehicle.get_type().get_rods(); + for(unsigned i=0; irender(tag); + } } }