55 { |
55 { |
56 const std::vector<gl::Polygon> modelPolygons = model->getPolygons(context->documents); |
56 const std::vector<gl::Polygon> modelPolygons = model->getPolygons(context->documents); |
57 polygons.reserve(polygons.size() + modelPolygons.size()); |
57 polygons.reserve(polygons.size() + modelPolygons.size()); |
58 for (gl::Polygon polygon : modelPolygons) |
58 for (gl::Polygon polygon : modelPolygons) |
59 { |
59 { |
60 for (int i = 0; i < polygon.numPolygonVertices(); i += 1) |
60 for (unsigned int i = 0; i < polygon.numPolygonVertices(); i += 1) |
61 { |
61 { |
62 polygon.vertices[i] = math::transform(polygon.vertices[1], this->transformation); |
62 polygon.vertices[i] = math::transform(polygon.vertices[i], this->transformation); |
63 } |
63 } |
64 if (polygon.color == colors::main) |
64 if (polygon.color == colors::main) |
65 { |
65 { |
66 polygon.color = this->colorIndex; |
66 polygon.color = this->colorIndex; |
67 } |
67 } |