| 658 | } |
| 659 | |
| 660 | bool StaticModel::GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout** layout) const |
| 661 | { |
| 662 | count = 0; |
| 663 | if (ref.LODIndex < 0 || ref.MeshIndex < 0) |
| 664 | return true; |
| 665 | const auto model = Model.Get(); |
| 666 | if (!model || model->WaitForLoaded()) |
| 667 | return true; |
| 668 | auto& lod = model->LODs[Math::Min(ref.LODIndex, model->LODs.Count() - 1)]; |
| 669 | auto& mesh = lod.Meshes[Math::Min(ref.MeshIndex, lod.Meshes.Count() - 1)]; |
| 670 | return mesh.DownloadDataCPU(type, result, count, layout); |
| 671 | } |
| 672 | |
| 673 | MeshBase* StaticModel::GetMesh(const MeshReference& ref) const |
| 674 | { |
nothing calls this directly
no test coverage detected