| 383 | } |
| 384 | |
| 385 | static void OutputMesh(Mesh* mesh, int indent) |
| 386 | { |
| 387 | OutputIndent(indent); |
| 388 | |
| 389 | const char* material_name = (mesh->m_Material && mesh->m_Material->m_Name) ? mesh->m_Material->m_Name : "null"; |
| 390 | |
| 391 | printf("mesh %s vertices: %u indices: %u mat: %s weights: %s colors: %s aabb: (%f, %f, %f) (%f, %f, %f)\n", |
| 392 | mesh->m_Name?mesh->m_Name:"null", mesh->m_VertexCount, mesh->m_Indices.Size(), |
| 393 | material_name, mesh->m_Weights.Empty()?"no":"yes", mesh->m_Colors.Empty()?"no":"yes", |
| 394 | mesh->m_Aabb.m_Min.x, mesh->m_Aabb.m_Min.y, mesh->m_Aabb.m_Min.z, |
| 395 | mesh->m_Aabb.m_Max.x, mesh->m_Aabb.m_Max.y, mesh->m_Aabb.m_Max.z); |
| 396 | |
| 397 | // if (mesh->m_Weights) |
| 398 | // { |
| 399 | // for (uint32_t i = 0; i < mesh->m_VertexCount; ++i) |
| 400 | // { |
| 401 | // printf(" %4u B: %2u, %2u, %2u, %2u\t", i, mesh->m_Bones[i*4+0], mesh->m_Bones[i*4+1], mesh->m_Bones[i*4+2], mesh->m_Bones[i*4+3]); |
| 402 | // printf(" W: %f, %f, %f, %f\n", mesh->m_Weights[i*4+0], mesh->m_Weights[i*4+1], mesh->m_Weights[i*4+2], mesh->m_Weights[i*4+3]); |
| 403 | // } |
| 404 | // } |
| 405 | //printf("tris: %u material: %s", mesh->) |
| 406 | |
| 407 | // for (uint32_t i = 0; i < mesh->m_IndexCount; ++i) |
| 408 | // { |
| 409 | // printf("%3d\t", mesh->m_Indices[i]); |
| 410 | // if (((i+1) % 16) == 0) |
| 411 | // printf("\n"); |
| 412 | // } |
| 413 | // printf("\n"); |
| 414 | } |
| 415 | |
| 416 | static void OutputModel(Model* model, int indent) |
| 417 | { |
no test coverage detected