MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMeshData

Method GetMeshData

Source/Engine/Level/Actors/AnimatedModel.cpp:1393–1404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1391}
1392
1393bool 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
1406MeshBase* AnimatedModel::GetMesh(const MeshReference& ref) const
1407{

Callers

nothing calls this directly

Calls 5

WaitForLoadedMethod · 0.80
DownloadDataCPUMethod · 0.80
MinFunction · 0.50
GetMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected