@@ -665,6 +665,16 @@ bool StaticModel::GetMeshData(const MeshReference& ref, MeshBufferType type, Byt
|
||||
return mesh.DownloadDataCPU(type, result, count, layout);
|
||||
}
|
||||
|
||||
MeshBase* StaticModel::GetMesh(const MeshReference& ref) const
|
||||
{
|
||||
const auto model = Model.Get();
|
||||
if (!model || model->WaitForLoaded())
|
||||
return nullptr;
|
||||
auto& lod = model->LODs[Math::Min(ref.LODIndex, model->LODs.Count() - 1)];
|
||||
auto& mesh = lod.Meshes[Math::Min(ref.MeshIndex, lod.Meshes.Count() - 1)];
|
||||
return &mesh;
|
||||
}
|
||||
|
||||
MeshDeformation* StaticModel::GetMeshDeformation() const
|
||||
{
|
||||
if (!_deformation)
|
||||
|
||||
Reference in New Issue
Block a user