ccdemos/common_ply.h
branchpyrit
changeset 93 96d65f841791
parent 92 9af5c039b678
child 100 c005054bf4c1
equal deleted inserted replaced
92:9af5c039b678 93:96d65f841791
    84 	}
    84 	}
    85 
    85 
    86 	for (int i = 0; i < vertex_num; i++)
    86 	for (int i = 0; i < vertex_num; i++)
    87 		if (vertex_face_num.at(i))
    87 		if (vertex_face_num.at(i))
    88 		{
    88 		{
    89 			normals[i] /= vertex_face_num.at(i);
    89 			normals[i] /= (Float)vertex_face_num.at(i);
    90 			normals[i].normalize();
    90 			normals[i].normalize();
    91 			vertices.at(i)->N = normals[i];
    91 			vertices.at(i)->N = normals[i];
    92 		}
    92 		}
    93 
    93 
    94 	delete[] normals;
    94 	delete[] normals;