]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/vehicle.cpp
Enable Renderer for Endpoint3D and Path3D
[r2c2.git] / source / 3d / vehicle.cpp
index ceded8bc04c8012af255f399763ada36074270cb..78899fd371d07a25f3f8046c7411974daedcf179 100644 (file)
@@ -95,65 +95,6 @@ void Vehicle3D::render(GL::Renderer &renderer, const GL::Tag &tag) const
                return;
 
        ObjectInstance::render(renderer, tag);
-
-       /*if(tag==0)
-       {
-               GL::PushMatrix push_mat;
-
-               const Point &pos = vehicle.get_position();
-               GL::translate(pos.x, pos.y, pos.z);
-               GL::rotate(vehicle.get_direction()*180/M_PI, 0, 0, 1);
-
-               if(const GL::Object *obj = type.get_body_object())
-                       obj->render(tag);*/
-
-               /*const vector<VehicleType::Axle> &axles = vehicle.get_type().get_axles();
-               for(unsigned i=0; i<axles.size(); ++i)
-                       if(const GL::Object *obj = type.get_axle_object(i))
-                       {
-                               GL::PushMatrix push_mat2;
-                               GL::translate(axles[i].position, 0, axles[i].wheel_dia/2);
-                               GL::rotate(vehicle.get_axle(i).angle*180/M_PI, 0, 1, 0);
-                               obj->render(tag);
-                       }
-
-               const vector<VehicleType::Bogie> &bogies = vehicle.get_type().get_bogies();
-               for(unsigned i=0; i<bogies.size(); ++i)
-               {
-                       GL::PushMatrix push_mat2;
-                       GL::translate(bogies[i].position, 0, 0);
-                       float angle = vehicle.get_bogie(i).direction*180/M_PI;
-                       GL::rotate(angle, 0, 0, 1);
-
-                       for(unsigned j=0; j<bogies[i].axles.size(); ++j)
-                               if(const GL::Object *obj = type.get_bogie_axle_object(i, j))
-                               {
-                                       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(i, j).angle*180/M_PI, 0, 1, 0);
-                                       obj->render(tag);
-                               }
-
-                       if(bogies[i].rotate_object)
-                               GL::rotate(180, 0, 0, 1);
-                       if(const GL::Object *obj = type.get_bogie_object(i))
-                               obj->render(tag);
-               }*/
-
-               /*const vector<VehicleType::Rod> &rods = vehicle.get_type().get_rods();
-               for(unsigned i=0; i<rods.size(); ++i)
-                       if(const GL::Object *obj = type.get_rod_object(i))
-                       {
-                               GL::PushMatrix push_mat2;
-                               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);
-                               GL::rotate(angle*180/M_PI, 0, -1, 0);
-                               obj->render(tag);
-                       }*/
-       //}
 }
 
 void Vehicle3D::setup_render(GL::Renderer &renderer, const GL::Tag &) const