| 1391 | } |
| 1392 | |
| 1393 | bool AnimatedModel::GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout** layout) const |
| 1394 | { |
| 1395 | count = 0; |
| 1396 | if (ref.LODIndex < 0 || ref.MeshIndex < 0) |
| 1397 | return true; |
| 1398 | const auto model = SkinnedModel.Get(); |
| 1399 | if (!model || model->WaitForLoaded()) |
| 1400 | return true; |
| 1401 | auto& lod = model->LODs[Math::Min(ref.LODIndex, model->LODs.Count() - 1)]; |
| 1402 | auto& mesh = lod.Meshes[Math::Min(ref.MeshIndex, lod.Meshes.Count() - 1)]; |
| 1403 | return mesh.DownloadDataCPU(type, result, count, layout); |
| 1404 | } |
| 1405 | |
| 1406 | MeshBase* AnimatedModel::GetMesh(const MeshReference& ref) const |
| 1407 | { |
nothing calls this directly
no test coverage detected