equal
deleted
inserted
replaced
69 vertex_face_num.at(v3)++; |
69 vertex_face_num.at(v3)++; |
70 f.ignore(1000,'\n'); |
70 f.ignore(1000,'\n'); |
71 } |
71 } |
72 |
72 |
73 for (int i = 0; i < vertex_num; i++) |
73 for (int i = 0; i < vertex_num; i++) |
74 { |
74 if (vertex_face_num.at(i)) |
75 normals.at(i) /= vertex_face_num.at(i); |
75 { |
76 normals.at(i).normalize(); |
76 normals.at(i) /= vertex_face_num.at(i); |
77 vertices.at(i)->N = normals.at(i); |
77 normals.at(i).normalize(); |
78 } |
78 vertices.at(i)->N = normals.at(i); |
|
79 } |
79 |
80 |
80 f.close(); |
81 f.close(); |
81 } |
82 } |