UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SkeletalMeshVertexClothBuffer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "RenderResource.h"
6#include "SkeletalMeshTypes.h"
7
9
15{
16public:
21
26
31
36
40 void CleanUp();
41
42 void ClearMetaData();
43
50
51
58
60
61 //~ Begin FRenderResource interface.
62
66 virtual void InitRHI(FRHICommandListBase& RHICmdList) override;
67
71 virtual void ReleaseRHI() override;
72
76 virtual FString GetFriendlyName() const override;
77
78 //~ End FRenderResource interface.
79
80 //~ Vertex data accessors.
81
83 {
84 checkSlow(VertexIndex < GetNumVertices());
85 return *((FMeshToMeshVertData*)(Data + VertexIndex * Stride));
86 }
87 inline const FMeshToMeshVertData& MappingData(uint32 VertexIndex) const
88 {
89 checkSlow(VertexIndex < GetNumVertices());
90 return *((FMeshToMeshVertData*)(Data + VertexIndex * Stride));
91 }
92
96 inline uint32 GetNumVertices() const
97 {
98 return NumVertices;
99 }
100
104 inline uint32 GetStride() const
105 {
106 return Stride;
107 }
112 {
113 return NumVertices * Stride;
114 }
115
117 {
118 return VertexBufferSRV;
119 }
120
122 {
123 return ClothIndexMapping;
124 }
125
128
132
133 ENGINE_API void SetMetadata(const TArray<FClothBufferIndexMapping>& ClothIndexMapping, uint32 Stride, uint32 NumVertices);
134
135private:
136 FShaderResourceViewRHIRef VertexBufferSRV;
137
139 TArray<FClothBufferIndexMapping> ClothIndexMapping;
140
144 uint8* Data;
146 uint32 Stride;
148 uint32 NumVertices;
149
153 void AllocateData();
154};
#define checkSlow(expr)
Definition AssertionMacros.h:332
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
void Init()
Definition LockFreeList.h:4
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition RHIResources.h:1581
Definition RHICommandList.h:455
Definition RHIResourceReplace.h:55
Definition SkeletalMeshVertexClothBuffer.h:15
uint32 GetVertexDataSize() const
Definition SkeletalMeshVertexClothBuffer.h:111
void ReleaseRHIForStreaming(FRHIResourceReplaceBatcher &Batcher)
Definition SkeletalMeshVertexClothBuffer.cpp:91
FShaderResourceViewRHIRef GetSRV() const
Definition SkeletalMeshVertexClothBuffer.h:116
virtual ENGINE_API ~FSkeletalMeshVertexClothBuffer()
Definition SkeletalMeshVertexClothBuffer.cpp:27
ENGINE_API FSkeletalMeshVertexClothBuffer()
Definition SkeletalMeshVertexClothBuffer.cpp:15
ENGINE_API void SetMetadata(const TArray< FClothBufferIndexMapping > &ClothIndexMapping, uint32 Stride, uint32 NumVertices)
Definition SkeletalMeshVertexClothBuffer.cpp:99
const TArray< FClothBufferIndexMapping > & GetClothIndexMapping() const
Definition SkeletalMeshVertexClothBuffer.h:121
const FMeshToMeshVertData & MappingData(uint32 VertexIndex) const
Definition SkeletalMeshVertexClothBuffer.h:87
uint32 GetStride() const
Definition SkeletalMeshVertexClothBuffer.h:104
ENGINE_API FSkeletalMeshVertexClothBuffer & operator=(const FSkeletalMeshVertexClothBuffer &Other)
Definition SkeletalMeshVertexClothBuffer.cpp:37
void InitRHIForStreaming(FRHIBuffer *IntermediateBuffer, FRHIResourceReplaceBatcher &Batcher)
Definition SkeletalMeshVertexClothBuffer.cpp:83
uint32 GetNumVertices() const
Definition SkeletalMeshVertexClothBuffer.h:96
void CleanUp()
Definition SkeletalMeshVertexClothBuffer.cpp:66
FMeshToMeshVertData & MappingData(uint32 VertexIndex)
Definition SkeletalMeshVertexClothBuffer.h:82
void SerializeMetaData(FArchive &Ar)
Definition SkeletalMeshVertexClothBuffer.cpp:167
FBufferRHIRef CreateRHIBuffer(FRHICommandListBase &RHICmdList)
Definition SkeletalMeshVertexClothBuffer.cpp:78
virtual FString GetFriendlyName() const override
Definition SkeletalMeshVertexClothBuffer.cpp:58
void ClearMetaData()
Definition SkeletalMeshVertexClothBuffer.cpp:72
virtual void InitRHI(FRHICommandListBase &RHICmdList) override
Definition SkeletalMeshVertexClothBuffer.cpp:110
virtual void ReleaseRHI() override
Definition SkeletalMeshVertexClothBuffer.cpp:128
ENGINE_API friend FArchive & operator<<(FArchive &Ar, FSkeletalMeshVertexClothBuffer &VertexBuffer)
Definition SkeletalMeshVertexClothBuffer.cpp:140
Definition SkeletalMeshVertexBuffer.h:106
Definition RenderResource.h:474
Definition Array.h:670
Definition SkeletalMeshTypes.h:94