Files
UnrealEngineUWP/Engine/Source/Runtime/ClothingSystemRuntimeInterface/Public/ClothPhysicalMeshDataBase_Legacy.h
Andrew Davidson 3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00

82 lines
2.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "UObject/Object.h"
#include "ClothVertBoneData.h"
#include "Containers/Array.h"
#include "Containers/Map.h"
#include "ClothPhysicalMeshDataBase_Legacy.generated.h"
/**
* Deprecated, use FClothPhysicalMeshData instead.
* Simulation mesh points, topology, and spatial parameters defined on that
* topology.
*
* Created curing asset import or created from a skeletal mesh.
*/
UCLASS()
class CLOTHINGSYSTEMRUNTIMEINTERFACE_API UClothPhysicalMeshDataBase_Legacy : public UObject
{
GENERATED_BODY()
public:
UClothPhysicalMeshDataBase_Legacy();
virtual ~UClothPhysicalMeshDataBase_Legacy();
/** Retrieve a registered vertex weight array by unique @param Id. */
TArray<float>* GetFloatArray(const uint32 Id) const;
/** Get ids for all registered weight arrays. */
TArray<uint32> GetFloatArrayIds() const;
/** Get all registered weight arrays. */
TArray<TArray<float>*> GetFloatArrays() const;
protected:
/** Register an @param Array keyed by a unique @param Id. */
void RegisterFloatArray(const uint32 Id, TArray<float> *Array);
public:
// Positions of each simulation vertex
UPROPERTY()
TArray<FVector3f> Vertices;
// Normal at each vertex
UPROPERTY()
TArray<FVector3f> Normals;
#if WITH_EDITORONLY_DATA
// Color at each vertex
UPROPERTY()
TArray<FColor> VertexColors;
#endif // WITH_EDITORONLY_DATA
// Indices of the simulation mesh triangles
UPROPERTY()
TArray<uint32> Indices;
// Inverse mass for each vertex in the physical mesh
UPROPERTY()
TArray<float> InverseMasses;
// Indices and weights for each vertex, used to skin the mesh to create the reference pose
UPROPERTY()
TArray<FClothVertBoneData> BoneData;
// Number of fixed verts in the simulation mesh (fixed verts are just skinned and do not simulate)
UPROPERTY()
int32 NumFixedVerts;
// Maximum number of bone weights of any vetex
UPROPERTY()
int32 MaxBoneWeights;
// Valid indices to use for self collisions (reduced set of Indices)
UPROPERTY()
TArray<uint32> SelfCollisionIndices;
private:
TMap<uint32, TArray<float>*> IdToArray;
};