103 for (const RingFinder::Component& component : g_RingFinder.bestSolution()->getComponents()) |
103 for (const RingFinder::Component& component : g_RingFinder.bestSolution()->getComponents()) |
104 { |
104 { |
105 primitiveModel.ringNumber = component.num; |
105 primitiveModel.ringNumber = component.num; |
106 primitiveFile = primitives()->getPrimitive(primitiveModel); |
106 primitiveFile = primitives()->getPrimitive(primitiveModel); |
107 Matrix matrix = Matrix::fromRotationMatrix(renderer()->currentCamera().transformationMatrix(component.scale)); |
107 Matrix matrix = Matrix::fromRotationMatrix(renderer()->currentCamera().transformationMatrix(component.scale)); |
108 model.emplace<LDSubfileReference>(primitiveFile, matrix, m_drawedVerts.first()); |
108 model.emplace<LDSubfileReference>(primitiveFile->name(), matrix, m_drawedVerts.first()); |
109 } |
109 } |
110 } |
110 } |
111 else |
111 else |
112 { |
112 { |
113 // Ring finder failed, last resort: draw the ring with quads |
113 // Ring finder failed, last resort: draw the ring with quads |