You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[FYI] Benn.Gallagher, Jaco.VanDyk #ROBOMERGE-SOURCE: CL 10005752 via CL 10005832 #ROBOMERGE-BOT: (v562-10004402) [CL 10005847 by kriss gossart in Main branch]
65 lines
1.4 KiB
C++
65 lines
1.4 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ClothPhysicalMeshDataBase.h"
|
|
|
|
UClothPhysicalMeshDataBase::UClothPhysicalMeshDataBase()
|
|
: NumFixedVerts(0)
|
|
, MaxBoneWeights(0)
|
|
{}
|
|
|
|
UClothPhysicalMeshDataBase::~UClothPhysicalMeshDataBase()
|
|
{}
|
|
|
|
void UClothPhysicalMeshDataBase::Reset(const int32 InNumVerts)
|
|
{
|
|
Vertices.Reset();
|
|
Normals.Reset();
|
|
#if WITH_EDITORONLY_DATA
|
|
VertexColors.Reset();
|
|
#endif // #if WITH_EDITORONLY_DATA
|
|
InverseMasses.Reset();
|
|
BoneData.Reset();
|
|
|
|
Vertices.AddDefaulted(InNumVerts);
|
|
Normals.AddDefaulted(InNumVerts);
|
|
#if WITH_EDITORONLY_DATA
|
|
VertexColors.AddDefaulted(InNumVerts);
|
|
#endif //#if WITH_EDITORONLY_DATA
|
|
|
|
InverseMasses.AddDefaulted(InNumVerts);
|
|
BoneData.AddDefaulted(InNumVerts);
|
|
|
|
NumFixedVerts = 0;
|
|
MaxBoneWeights = 0;
|
|
}
|
|
|
|
TArray<float>* UClothPhysicalMeshDataBase::GetFloatArray(const uint32 Id) const
|
|
{
|
|
check(IdToArray.Contains(Id));
|
|
return IdToArray[Id];
|
|
}
|
|
|
|
TArray<uint32> UClothPhysicalMeshDataBase::GetFloatArrayIds() const
|
|
{
|
|
TArray<uint32> Keys;
|
|
IdToArray.GetKeys(Keys);
|
|
return Keys;
|
|
}
|
|
|
|
TArray<TArray<float>*> UClothPhysicalMeshDataBase::GetFloatArrays() const
|
|
{
|
|
TArray<TArray<float>*> Values;
|
|
IdToArray.GenerateValueArray(Values);
|
|
return Values;
|
|
}
|
|
|
|
void UClothPhysicalMeshDataBase::RegisterFloatArray(
|
|
const uint32 Id,
|
|
TArray<float> *Array)
|
|
{
|
|
check(Id != INDEX_NONE);
|
|
check(Array != nullptr);
|
|
check(!IdToArray.Contains(Id) || IdToArray[Id] == Array);
|
|
IdToArray.Add(Id, Array);
|
|
}
|