X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fvehicle.cpp;h=8027a1999d3827ab14dad36ced4816703f070a34;hb=ce8be590703fdc0709863f0ee9695f40b6adb200;hp=50dbcb0d693134d969964ba31249bf71e3acc9c7;hpb=37af7970d9cefcf40ae58ca06ca8469f56b0cc13;p=r2c2.git diff --git a/source/3d/vehicle.cpp b/source/3d/vehicle.cpp index 50dbcb0..8027a19 100644 --- a/source/3d/vehicle.cpp +++ b/source/3d/vehicle.cpp @@ -64,7 +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); + GL::rotate(vehicle.get_axle(i).angle*180/M_PI, 0, 1, 0); obj->render(tag); } @@ -73,7 +73,7 @@ void Vehicle3D::render(const GL::Tag &tag) const { GL::PushMatrix push_mat2; GL::translate(bogies[i].position, 0, 0); - float angle = vehicle.get_bogie_direction(i)*180/M_PI; + float angle = vehicle.get_bogie(i).direction*180/M_PI; GL::rotate(angle, 0, 0, 1); for(unsigned j=0; jrender(tag); } @@ -96,8 +96,8 @@ void Vehicle3D::render(const GL::Tag &tag) const if(const GL::Object *obj = type.get_rod_object(i)) { GL::PushMatrix push_mat2; - const Point &rpos = vehicle.get_rod_position(i); - float angle = vehicle.get_rod_angle(i); + const Point &rpos = vehicle.get_rod(i).position; + float angle = vehicle.get_rod(i).angle; GL::translate(rpos.x, rpos.y, rpos.z); if(rods[i].mirror_object) GL::scale(1, -1, 1);