| 175 | } |
| 176 | |
| 177 | int main(int argc, char **argv) { |
| 178 | int N, M; |
| 179 | int arg = argc > 1 ? argv[1][0] - '0' : 3; |
| 180 | switch(arg) { |
| 181 | case 0: return 0; break; |
| 182 | case 1: N = 2000; M = 1700; break; |
| 183 | case 2: N = 6600; M = 6500; break; |
| 184 | case 3: N = 9500; M = 10000; break; |
| 185 | case 4: N = 2*11000; M = 2*12000; break; |
| 186 | case 5: N = 3*10000; M = 3*10800; break; |
| 187 | default: printf("error: %d\\n", arg); return -1; |
| 188 | } |
| 189 | |
| 190 | Vertex *v = new Vertex[N]; |
| 191 | Influence *i = new Influence[N]; |
| 192 | for (int k = 0; k < N; ++k) { |
| 193 | v[k].position.setAsPoint(1.0f, 2.0f, 3.0f); |
| 194 | v[k].normal.setAsVector(0.0f, 0.0f, 1.0f); |
| 195 | i[k].boneId = 0; |
| 196 | i[k].weight = 1.0f; |
| 197 | i[k].lastInfluenceForThisVertex = true; |
| 198 | } |
| 199 | |
| 200 | BoneTransform bt; |
| 201 | memset(&bt, 0, sizeof(bt)); |
| 202 | |
| 203 | CalVector4 *output = new CalVector4[N * 2]; |
| 204 | |
| 205 | for (unsigned j = 0; j < M; j++) |
| 206 | calculateVerticesAndNormals_x87(&bt, N, v, i, output); |
| 207 | |
| 208 | float sum = 0; |
| 209 | for (unsigned j = 0; j < N * 2; ++j) { |
| 210 | sum += (output[j].x + output[j].y + output[j].z + output[j].w); |
| 211 | } |
| 212 | |
| 213 | printf("blah=%f\n", sum); |
| 214 | |
| 215 | return 0; |
| 216 | } |
| 217 |
nothing calls this directly
no test coverage detected