UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SkeletalMeshTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
10#include "GPUSkinPublicDefs.h"
11
16class UMorphTarget;
17class UPrimitiveComponent;
19class USkeletalMesh;
22class USkinnedAsset;
23
35
38{
39 // Use red channel as recompute tangents blending mask
40 Red = 0,
41 // Use green channel as recompute tangents blending mask
42 Green = 1,
43 // Use blue channel as recompute tangents blending mask
44 Blue = 2,
45 // Alpha channel not used by recompute tangents
46 Alpha = 3,
47 None = Alpha
48};
49
51{
52 Default,
54};
55
89
94{
95 // Barycentric coords and distance along normal for the position of the final vert
97
98 // Barycentric coords and distance along normal for the location of the unit normal endpoint
99 // Actual normal = ResolvedNormalPosition - ResolvedPosition
101
102 // Barycentric coords and distance along normal for the location of the unit Tangent endpoint
103 // Actual normal = ResolvedNormalPosition - ResolvedPosition
105
106 // Contains the 3 indices for verts in the source mesh forming a triangle, the last element
107 // is a flag to decide how the skinning works, 0xffff uses no simulation, and just normal
108 // skinning, anything else uses the source mesh and the above skin data to get the final position
110
111 // For weighted averaging of multiple triangle influences
112 float Weight = 0.0f;
113
114 // Dummy for alignment
116
118};
119
139
141{
146
147 bool IsValid() const
148 {
150 }
151
154
157
159 {
160 Ar << Data.AssetGuid;
161 Ar << Data.AssetLodIndex;
162
163 return Ar;
164 }
165};
166
167
187
188#if WITH_EDITOR
189
190//Helper to scope skeletal mesh post edit change.
192{
193public:
194 /*
195 * This constructor increment the skeletal mesh PostEditChangeStackCounter. If the stack counter is zero before the increment
196 * the skeletal mesh component will be unregister from the world. The component will also release there rendering resources.
197 * Parameters:
198 * @param InbCallPostEditChange - if we are the first scope PostEditChange will be called.
199 * @param InbReregisterComponents - if we are the first scope we will re register component from world and also component render data.
200 */
202
203 /*
204 * This destructor decrement the skeletal mesh PostEditChangeStackCounter. If the stack counter is zero after the decrement,
205 * the skeletal mesh PostEditChange will be call. The component will also be register to the world and there render data resources will be rebuild.
206 */
208
209 ENGINE_API void SetSkeletalMesh(USkeletalMesh* InSkeletalMesh);
210
211private:
217};
218
219//Helper to scope the component register context.
221{
222public:
223 /*
224 * This constructor will enregister all skeletal mesh component from the world. The component will also release there rendering resources.
225 * Parameters:
226 */
228
229 /*
230 * This destructor will Reregister all unregistered component to the world and there render data resources will be rebuild.
231 */
233
234
235private:
239};
240
241#endif
@ INDEX_NONE
Definition CoreMiscDefines.h:150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
#define MAX_TOTAL_INFLUENCES
Definition GPUSkinPublicDefs.h:12
@ MAX_TEXCOORDS
Definition MeshUVChannelInfo.h:8
ESkinVertexFactoryMode
Definition SkeletalMeshTypes.h:51
ESkeletalMeshVertexFlags
Definition SkeletalMeshTypes.h:26
ESkinVertexColorChannel
Definition SkeletalMeshTypes.h:38
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition MaterialRenderProxy.h:102
Definition MeshElementCollector.h:26
Definition PrimitiveDrawInterface.h:19
Definition RawIndexBuffer.h:326
Definition SkeletalMeshLODRenderData.h:128
Definition SkeletalMeshRenderData.h:17
Definition SkeletalMeshTypes.h:170
ENGINE_API ~FSkinnedMeshComponentRecreateRenderStateContext()
Definition SkinnedAsset.cpp:608
Definition Array.h:670
Definition IndirectArray.h:20
Definition MorphTarget.h:230
Definition SkeletalMesh.h:440
Definition SkinnedAsset.h:47
Definition SkinnedMeshComponent.h:258
Definition SceneManagement.h:73
Definition SkeletalMeshTypes.h:127
uint32 BaseVertexIndex
Definition SkeletalMeshTypes.h:129
friend ENGINE_API FArchive & operator<<(FArchive &Ar, FClothBufferIndexMapping &V)
Definition SkeletalMesh.cpp:197
uint32 MappingOffset
Definition SkeletalMeshTypes.h:132
uint32 LODBiasStride
Definition SkeletalMeshTypes.h:135
Definition SkeletalMeshTypes.h:141
FGuid AssetGuid
Definition SkeletalMeshTypes.h:153
FClothingSectionData()
Definition SkeletalMeshTypes.h:142
int32 AssetLodIndex
Definition SkeletalMeshTypes.h:156
friend FArchive & operator<<(FArchive &Ar, FClothingSectionData &Data)
Definition SkeletalMeshTypes.h:158
bool IsValid() const
Definition SkeletalMeshTypes.h:147
Definition Color.h:486
Definition Guid.h:109
bool IsValid() const
Definition Guid.h:318
Definition SkeletalMeshTypes.h:94
FVector4f PositionBaryCoordsAndDist
Definition SkeletalMeshTypes.h:96
FVector4f TangentBaryCoordsAndDist
Definition SkeletalMeshTypes.h:104
FVector4f NormalBaryCoordsAndDist
Definition SkeletalMeshTypes.h:100
float Weight
Definition SkeletalMeshTypes.h:112
friend ENGINE_API FArchive & operator<<(FArchive &Ar, FMeshToMeshVertData &V)
Definition SkeletalMesh.cpp:169
uint32 Padding
Definition SkeletalMeshTypes.h:115
uint16 SourceMeshVertIndices[4]
Definition SkeletalMeshTypes.h:109
Definition SkeletalMeshTypes.h:57
FVector3f TangentY
Definition SkeletalMeshTypes.h:63
uint16 InfluenceWeights[MAX_TOTAL_INFLUENCES]
Definition SkeletalMeshTypes.h:72
FVector3f Position
Definition SkeletalMeshTypes.h:58
FVector3f TangentX
Definition SkeletalMeshTypes.h:61
ENGINE_API uint16 GetMaximumWeight() const
FColor Color
Definition SkeletalMeshTypes.h:70
uint16 InfluenceBones[MAX_TOTAL_INFLUENCES]
Definition SkeletalMeshTypes.h:71
ENGINE_API bool GetRigidWeightBone(uint16 &OutBoneIndex) const
friend FArchive & operator<<(FArchive &Ar, FSoftSkinVertex &V)
FVector2f UVs[MAX_TEXCOORDS]
Definition SkeletalMeshTypes.h:68
FVector4f TangentZ
Definition SkeletalMeshTypes.h:65