| 1077 | |
| 1078 | |
| 1079 | int computeCorner(const CMesh& mesh, const CFace& face, int index, tvVec3List& v, tvVec3List& n, tvVec2List& u, tvVec3List& c) { |
| 1080 | int vertIndex = getNewIndex(mesh.verts[face.verts[index]], v); |
| 1081 | int normalIndex = getNewIndex(mesh.normals[face.normals[index]], n); |
| 1082 | int uvIndex; |
| 1083 | if (!face.texCoords.size()) { |
| 1084 | uvIndex = getNewIndex(CVector2(0, 0), u); |
| 1085 | } |
| 1086 | else { |
| 1087 | uvIndex = getNewIndex(mesh.texCoords[face.texCoords[index]], u); |
| 1088 | } |
| 1089 | |
| 1090 | CVector3 vert; |
| 1091 | vert.x = (float)vertIndex; |
| 1092 | vert.y = (float)normalIndex; |
| 1093 | vert.z = (float)uvIndex; |
| 1094 | |
| 1095 | return getNewIndex(vert, c); |
| 1096 | } |
| 1097 | |
| 1098 | int computeCorner(const CMesh& mesh, const CTriStrip& strip, int index, tvVec3List& v, tvVec3List& n, tvVec2List& u, tvVec3List& c) { |
| 1099 | // it's highly likely that the strip will use |
no test coverage detected