Add normals computing to cloth mesh
This commit is contained in:
@@ -127,7 +127,7 @@ void MeshDeformation::RunDeformers(const MeshBase* mesh, MeshBufferType type, GP
|
||||
}
|
||||
if (!deformation)
|
||||
{
|
||||
deformation = New<MeshDeformationData>(key, vertexStride);
|
||||
deformation = New<MeshDeformationData>(key, type, vertexStride);
|
||||
deformation->VertexBuffer.Data.Resize(vertexBuffer->GetSize());
|
||||
deformation->Bounds = mesh->GetBox();
|
||||
_deformations.Add(deformation);
|
||||
|
||||
@@ -13,14 +13,16 @@
|
||||
struct MeshDeformationData
|
||||
{
|
||||
uint64 Key;
|
||||
MeshBufferType Type;
|
||||
uint32 DirtyMinIndex = 0;
|
||||
uint32 DirtyMaxIndex = MAX_uint32 - 1;
|
||||
bool Dirty = true;
|
||||
BoundingBox Bounds;
|
||||
DynamicVertexBuffer VertexBuffer;
|
||||
|
||||
MeshDeformationData(uint64 key, uint32 stride)
|
||||
MeshDeformationData(uint64 key, MeshBufferType type, uint32 stride)
|
||||
: Key(key)
|
||||
, Type(type)
|
||||
, VertexBuffer(0, stride, TEXT("MeshDeformation"))
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user