ccdemos/common_ply.h
branchpyrit
changeset 69 303583d2fb97
parent 41 c1080cb5bd6d
child 72 7c3f38dff082
equal deleted inserted replaced
68:2c154aad7f33 69:303583d2fb97
    57 			continue;
    57 			continue;
    58 		}
    58 		}
    59 		f >> v1 >> v2 >> v3;
    59 		f >> v1 >> v2 >> v3;
    60 		face = new Triangle(vertices.at(v1), vertices.at(v3), vertices.at(v2), mat);
    60 		face = new Triangle(vertices.at(v1), vertices.at(v3), vertices.at(v2), mat);
    61 		rt.addshape(face);
    61 		rt.addshape(face);
    62 		face->setSmooth();
       
    63 
    62 
    64 		normals.at(v1) += face->getNormal();
    63 		normals.at(v1) += face->getNormal();
    65 		vertex_face_num.at(v1)++;
    64 		vertex_face_num.at(v1)++;
    66 		normals.at(v2) += face->getNormal();
    65 		normals.at(v2) += face->getNormal();
    67 		vertex_face_num.at(v2)++;
    66 		vertex_face_num.at(v2)++;