**Refactor meshes format to support custom vertex layouts and new flexible api to access mesh data**
#3044 #2667
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "MeshDeformation.h"
|
||||
#include "MeshAccessor.h"
|
||||
#include "Engine/Graphics/Models/MeshBase.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
|
||||
@@ -29,6 +30,11 @@ FORCE_INLINE static uint32 GetKey(int32 lodIndex, int32 meshIndex, MeshBufferTyp
|
||||
return key.Value;
|
||||
}
|
||||
|
||||
bool MeshDeformationData::LoadMeshAccessor(MeshAccessor& accessor) const
|
||||
{
|
||||
return accessor.LoadBuffer(Type, ToSpan(VertexBuffer.Data), VertexBuffer.GetLayout());
|
||||
}
|
||||
|
||||
void MeshDeformation::GetBounds(int32 lodIndex, int32 meshIndex, BoundingBox& bounds) const
|
||||
{
|
||||
const auto key = GetKey(lodIndex, meshIndex, MeshBufferType::Vertex0);
|
||||
|
||||
Reference in New Issue
Block a user