UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ShapeInstance.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "Chaos/Core.h"
5
8#include "Chaos/ImplicitFwd.h"
12#include "Chaos/Properties.h"
13#include "Chaos/Serializable.h"
15
16namespace Chaos
17{
18 class FImplicitObject;
19 class FShapeInstance;
20 class FShapeInstanceProxy;
21
22 namespace Private
23 {
24 class FShapeInstanceExtended;
25 }
26
27
36 {
37 protected:
39 {
40 Proxy,
41 Sim,
43 };
44
46 {
47 return Type;
48 }
49
50 // Call a function on the concrete type
51 template<typename TLambda> decltype(auto) DownCast(const TLambda& Lambda);
52 template<typename TLambda> decltype(auto) DownCast(const TLambda& Lambda) const;
53
56
57 public:
58 // Downcasts exposed until we deprecate and remove FPerShapeData
62 const FShapeInstance* AsShapeInstance() const;
63
64 public:
65 static constexpr bool AlwaysSerializable = true;
66
67 UE_DEPRECATED(5.3, "Not used")
69
70 UE_DEPRECATED(5.3, "Call FShapeInstanceProxy::Make for game thread objects, FShapeInstance::Make for physics thread objects")
72
75
76
78
80
81 CHAOS_API virtual void Serialize(FChaosArchive& Ar);
82
84
85 UE_DEPRECATED(5.4, "Bounds no longer expanded. Use UpdateShapeBounds without BoundsExpansion")
87
88 void* GetUserData() const;
89 void SetUserData(void* InUserData);
90
93
94 const FCollisionFilterData& GetSimData() const;
96
103
105
107
108 void UpdateWorldSpaceState(const FRigidTransform3& WorldTransform);
109
110 UE_DEPRECATED(5.4, "Bounds no longer expanded. Use GetWorldSpaceShapeBounds()")
112
113 UE_DEPRECATED(5.4, "Bounds no longer expanded. Use UpdateWorldSpaceState() without BoundsExpansion")
114 void UpdateWorldSpaceState(const FRigidTransform3& WorldTransform, const FVec3& BoundsExpansion) { UpdateWorldSpaceState(WorldTransform); }
115
116 // The leaf shape (with transformed and implicit wrapper removed).
117 const FImplicitObject* GetLeafGeometry() const;
118
119 // The actor-relative transform of the leaf geometry.
121
122 // The world-space transform of the leaf geometry.
123 // If we have non-identity leaf relative transform, is cached from the last call to UpdateWorldSpaceState.
124 // If not cahced, is constructed from arguments.
126
128
129 int32 NumMaterials() const;
130 const FMaterialHandle& GetMaterial(const int32 Index) const;
131
136
140
141 const TArray<uint32>& GetMaterialMaskMaps() const;
144
148
149 const FShapeDirtyFlags GetDirtyFlags() const;
150
151 bool GetQueryEnabled() const;
152 void SetQueryEnabled(const bool bEnable);
153
154 bool GetSimEnabled() const;
155 void SetSimEnabled(const bool bEnable);
156
157 bool GetIsProbe() const;
158 void SetIsProbe(const bool bIsProbe);
159
162
163 const FCollisionData& GetCollisionData() const;
164 void SetCollisionData(const FCollisionData& Data);
165
166 const FMaterialData& GetMaterialData() const;
167 void SetMaterialData(const FMaterialData& Data);
168
170
172
173 int32 GetShapeIndex() const;
175
176 template <typename Lambda> void ModifySimData(const Lambda& LambdaFunc);
177 template <typename Lambda> void ModifyMaterials(const Lambda& LambdaFunc);
178 template <typename Lambda> void ModifyMaterialMasks(const Lambda& LambdaFunc);
179 template <typename Lambda> void ModifyMaterialMaskMaps(const Lambda& LambdaFunc);
180 template <typename Lambda> void ModifyMaterialMaskMapMaterials(const Lambda& LambdaFunc);
181
182 protected:
191
192 UE_DEPRECATED(5.4, "Use FPerShapeData with FImplicitObjectPtr instead")
202
211
220
221 virtual void SerializeMaterials(FChaosArchive& Ar) = 0;
222
224 uint32 bIsSingleMaterial : 1; // For use by FShapeInstance (here because the space is available for free)
226 FShapeDirtyFlags DirtyFlags; // For use by FShapeInstanceProxy as there's 4 bytes of padding here
229 };
230
231
234 //
235 // FShapeInstanceProxy
236 //
239
240 /*
241 * NOTE: FShapeInstanceProxy is a Game-Thread object.
242 * See FShapeInstance for the physics-thread equivalent
243 *
244 * FShapeInstanceProxy contains the per-shape data associated with a single shape on a particle.
245 * This contains data like the collision / query filters, material properties etc.
246 *
247 * Every particle holds one FShapeInstanceProxy object for each geometry they use.
248 * If the particle has a Union of geometries there will be one FShapeInstanceProxy
249 * for each geometry in the union. (Except ClusteredUnions - these are not flattened
250 * because they contain their own query acceleration structure.)
251 *
252 * NOTE: keep size to a minimum. There can be millions of these in s scene.
253 *
254 * @todo(chaos) : try to remove the GT Proxy pointer - this could easily be passed into the
255 * relevant functions instead.
256 *
257 * @todo(chaos) : reduce the cost of MaterialData for shapes with one materialand no masks etc.
258 */
260 {
261 public:
262 friend class FPerShapeData;
263
264 UE_DEPRECATED(5.4, "Use Make with FImplicitObjectPtr instead")
270
271 UE_DEPRECATED(5.4, "Use UpdateGeometry with FImplicitObjectPtr instead")
276
280
282
283 void* GetUserData() const { return CollisionData.Read().UserData; }
285 {
286 CollisionData.Modify(true, DirtyFlags, Proxy, ShapeIdx, [InUserData](FCollisionData& Data) { Data.UserData = InUserData; });
287 }
288
290 const FCollisionFilterData& GetQueryData() const { return CollisionData.Read().GetQueryData(); }
292 {
293 CollisionData.Modify(true, DirtyFlags, Proxy, ShapeIdx, [InQueryData](FCollisionData& Data) { Data.SetQueryData(InQueryData); });
294 }
295
296 const FCollisionFilterData& GetSimData() const { return CollisionData.Read().GetSimData(); }
298 {
299 CollisionData.Modify(true, DirtyFlags, Proxy, ShapeIdx, [InSimData](FCollisionData& Data) { Data.SetSimData(InSimData); });
300 }
302
309
310 CHAOS_API void UpdateWorldSpaceState(const FRigidTransform3& WorldTransform);
311
312 // The leaf shape (with transformed and implicit wrapper removed).
314
315 // The actor-relative transform of the leaf geometry.
317
318 // The world-space transform of the leaf geometry.
319 // If we have non-identity leaf relative transform, is cached from the last call to UpdateWorldSpaceState.
320 // If not cahced, is constructed from arguments.
323
324 int32 NumMaterials() const { return Materials.Read(). Materials.Num(); }
325 const FMaterialHandle& GetMaterial(const int32 Index) const { return Materials.Read().Materials[Index]; }
326
327 const TArray<FMaterialHandle>& GetMaterials() const { return Materials.Read().Materials; }
328 const TArray<FMaterialMaskHandle>& GetMaterialMasks() const { return Materials.Read().MaterialMasks; }
329 const TArray<uint32>& GetMaterialMaskMaps() const { return Materials.Read().MaterialMaskMaps; }
330 const TArray<FMaterialHandle>& GetMaterialMaskMapMaterials() const { return Materials.Read().MaterialMaskMapMaterials; }
331
332 const FShapeDirtyFlags GetDirtyFlags() const { return DirtyFlags; }
333
335 {
337 {
338 Data.Materials.Reset(1);
339 Data.Materials.Add(InMaterial);
340 });
341 }
342
344 {
346 {
347 Data.Materials = InMaterials;
348 });
349 }
350
352 {
354 {
355 Data.Materials = MoveTemp(InMaterials);
356 });
357 }
358
360 {
362 {
363 Data.MaterialMasks = InMaterialMasks;
364 });
365 }
366
368 {
370 {
371 Data.MaterialMaskMaps = InMaterialMaskMaps;
372 });
373 }
374
382
383 bool GetQueryEnabled() const { return CollisionData.Read().bQueryCollision; }
384 void SetQueryEnabled(const bool bEnable)
385 {
386 CollisionData.Modify(true, DirtyFlags, Proxy, ShapeIdx, [bEnable](FCollisionData& Data) { Data.bQueryCollision = bEnable; });
387 }
388
389 bool GetSimEnabled() const { return CollisionData.Read().bSimCollision; }
390 void SetSimEnabled(const bool bEnable)
391 {
392 CollisionData.Modify(true, DirtyFlags, Proxy, ShapeIdx, [bEnable](FCollisionData& Data) { Data.bSimCollision = bEnable; });
393 }
394
395 bool GetIsProbe() const { return CollisionData.Read().bIsProbe; }
396 void SetIsProbe(const bool bIsProbe)
397 {
398 CollisionData.Modify(true, DirtyFlags, Proxy, ShapeIdx, [bIsProbe](FCollisionData& Data) { Data.bIsProbe = bIsProbe; });
399 }
400
401 EChaosCollisionTraceFlag GetCollisionTraceType() const { return CollisionData.Read().CollisionTraceType; }
403 {
404 CollisionData.Modify(true, DirtyFlags, Proxy, ShapeIdx, [InTraceFlag](FCollisionData& Data) { Data.CollisionTraceType = InTraceFlag; });
405 }
406
407 const FCollisionData& GetCollisionData() const { return CollisionData.Read(); }
408
410 {
411 CollisionData.Write(Data, true, DirtyFlags, Proxy, ShapeIdx);
412 }
413
414 const FMaterialData& GetMaterialData() const { return Materials.Read(); }
415
417 {
418 Materials.Write(Data, true, DirtyFlags, Proxy, ShapeIdx);
419 }
420
422 {
423 RemoteData.SetFlags(DirtyFlags);
424 CollisionData.SyncRemote(Manager, ShapeDataIdx, RemoteData);
425 Materials.SyncRemote(Manager, ShapeDataIdx, RemoteData);
427 }
428
430 {
431 Proxy = InProxy;
432 if (Proxy)
433 {
434 if (DirtyFlags.IsDirty())
435 {
437 {
438 PhysicsSolverBase->AddDirtyProxyShape(Proxy, ShapeIdx);
439 }
440 }
441 }
442 }
443
444 template <typename Lambda>
451
452 template <typename Lambda>
453 void ModifyMaterials(const Lambda& LambdaFunc)
454 {
456 {
457 LambdaFunc(Data.Materials);
458 });
459 }
460
461 template <typename Lambda>
462 void ModifyMaterialMasks(const Lambda& LambdaFunc)
463 {
465 {
466 LambdaFunc(Data.MaterialMasks);
467 });
468 }
469
470 template <typename Lambda>
472 {
474 {
475 LambdaFunc(Data.MaterialMaskMaps);
476 });
477 }
478
479 template <typename Lambda>
481 {
483 {
484 LambdaFunc(Data.MaterialMaskMapMaterials);
485 });
486 }
487
488 protected:
496
497 UE_DEPRECATED(5.4, "Use FShapeInstanceProxy with FImplicitObjectPtr instead")
506
514
515 CHAOS_API virtual void SerializeMaterials(FChaosArchive& Ar) override final;
516
517
519
522 };
523
524
527 //
528 // FShapeInstance
529 //
532
533
534 /*
535 * NOTE: FShapeInstance is a Physics-Thread object.
536 * See FShapeInstanceProxy for the game-thread equivalent
537 *
538 * FShapeInstance contains the per-shape data associated with a single shape on a particle.
539 * This contains data like the collision / query filters, material properties etc.
540 *
541 * Every particle holds one FShapeInstance object for each geometry they use.
542 * If the particle has a Union of geometries there will be one FShapeInstance
543 * for each geometry in the union. (Except ClusteredUnions - these are not flattened
544 * because they contain their own query acceleration structure.)
545 *
546 * NOTE: keep size to a minimum. There can be millions of these in s scene.
547 *
548 * NOTE: this version has reduced-memory material storage compared to FShapeInstanceProxy,
549 * but increased cost when switching from a single-material to a multi-material shape
550 * (though this should not be happening much if at all).
551 *
552 */
554 {
555 public:
556 friend class FPerShapeData;
557
561
563 {
564 if (!bIsSingleMaterial && (Material.MaterialData != nullptr))
565 {
566 delete Material.MaterialData;
567 }
568 }
569
571
572 void* GetUserData() const { return CollisionData.UserData; }
574
578
582
589
590 CHAOS_API void UpdateWorldSpaceState(const FRigidTransform3& WorldTransform);
591
592 // The leaf shape (with transformed and implicit wrapper removed).
594
595 // The actor-relative transform of the leaf geometry.
597
598 // The world-space transform of the leaf geometry.
599 // If we have non-identity leaf relative transform, is cached from the last call to UpdateWorldSpaceState.
600 // If not cahced, is constructed from arguments.
603
605 {
607 {
608 return Material.MaterialHandle.IsValid() ? 1 : 0;
609 }
610 else
611 {
612 return (Material.MaterialData != nullptr) ? Material.MaterialData->Materials.Num() : 0;
613 }
614 }
615
617 {
619 {
620 check(Index == 0);
623 }
624 else
625 {
627 }
628 }
629
631 {
633 {
634 return Material.MaterialHandle.IsValidInternal(SimMaterials) ? 1 : 0;
635 }
636 else
637 {
638 return (Material.MaterialData != nullptr) ? Material.MaterialData->Materials.Num() : 0;
639 }
640 }
641
643 {
645 {
646 check(Index == 0);
649 }
650 else
651 {
653 }
654 }
655
656
661
668
670 void SetQueryEnabled(const bool bEnable) { CollisionData.bQueryCollision = bEnable; }
671
673 void SetSimEnabled(const bool bEnable) { CollisionData.bSimCollision = bEnable; }
674
675 bool GetIsProbe() const { return CollisionData.bIsProbe; }
676 void SetIsProbe(const bool bIsProbe) { CollisionData.bIsProbe = bIsProbe; }
677
680
682 void SetCollisionData(const FCollisionData& Data) { CollisionData = Data; }
683
686
687 // @todo(chaos): remove when FPerShapeData is removed
688 const FShapeDirtyFlags GetDirtyFlags() const { check(false); return FShapeDirtyFlags(); }
691
693 template <typename Lambda> void ModifySimData(const Lambda& LambdaFunc) { LambdaFunc(CollisionData.SimData); }
695 template <typename Lambda> void ModifyMaterials(const Lambda& LambdaFunc) { LambdaFunc(GetMaterialDataImpl().Materials); }
696 template <typename Lambda> void ModifyMaterialMasks(const Lambda& LambdaFunc) { LambdaFunc(GetMaterialDataImpl().MaterialMasks); }
697 template <typename Lambda> void ModifyMaterialMaskMaps(const Lambda& LambdaFunc) { LambdaFunc(GetMaterialDataImpl().MaterialMaskMaps); }
698 template <typename Lambda> void ModifyMaterialMaskMapMaterials(const Lambda& LambdaFunc) { LambdaFunc(GetMaterialDataImpl().MaterialMaskMapMaterials); }
699
700 protected:
707
708 UE_DEPRECATED(5.4, "Use FShapeInstance with FImplicitObjectPtr instead")
715
722
726 {
728 {
729 Material.MaterialHandle = Other.Material.MaterialHandle;
730 }
731 else
732 {
733 Material.MaterialData = Other.Material.MaterialData;
734 Other.Material.MaterialData = nullptr;
735 }
736 }
737
738 UE_DEPRECATED(5.4, "Use FShapeInstance with FImplicitObjectPtr instead")
745
752
756 {
758 {
759 Material.MaterialHandle = Other.Material.MaterialHandle;
760 }
761 else
762 {
763 Material.MaterialData = Other.Material.MaterialData;
764 Other.Material.MaterialData = nullptr;
765 }
766 }
767
769 {
771 {
773
775 bIsSingleMaterial = false;
776
777 if (ExistingMaterial.IsValid())
778 {
779 // Ideally we do not get here if we have been setup as a single-material shape.
780 // However the API combination of SetMaterial() and GetMaterialData() requires
781 // we be able to upgrade from a single material to multi-material shape.
782 // We should try to remove this if possible.
783 UE_LOG(LogChaos, Warning, TEXT("Perf/memory warning: request for Material Array on single-material ShapeInstance"));
784
786 }
787 }
788 return *Material.MaterialData;
789 }
790
792 {
793 return const_cast<FShapeInstance*>(this)->GetMaterialDataImpl();
794 }
795
797 {
799 {
800 // Destroy existing MaterialData if present
801 if (Material.MaterialData != nullptr)
802 {
803 delete Material.MaterialData;
804 }
805 bIsSingleMaterial = true;
806 }
807
809 }
810
812 {
813 // If we have only one material and no masks, we can use the single material handle
814 if ((Data.Materials.Num() <= 1) && Data.MaterialMasks.IsEmpty() && Data.MaterialMaskMaps.IsEmpty() && Data.MaterialMaskMapMaterials.IsEmpty())
815 {
816 const FMaterialHandle MaterialHandle = (Data.Materials.Num() > 0) ? Data.Materials[0] : FMaterialHandle();
817 SetMaterialImpl(MaterialHandle);
818 }
819 else
820 {
821 // This could probably be a Move except it would change the SetMaterialData API
822 // As it stands this will duplicate (and eventually discard) the material and mask arrays
823 // although this is probably not called on an already-initialized material data very often
824 GetMaterialDataImpl() = Data;
825 }
826 }
827
828 CHAOS_API virtual void SerializeMaterials(FChaosArchive& Ar) override final;
829
831 {
832 FMaterialUnion() : MaterialHandle() {} // Default to single-shape mode
833 ~FMaterialUnion() {} // Destruction handled by FShapeInstance
834
835 FMaterialHandle MaterialHandle; // Set if we have only 1 material, no masks etc
836 FMaterialData* MaterialData; // Set if we have multiple materials or any masks
837 };
838
841
842 };
843
844 namespace Private
845 {
846
849 //
850 // FShapeInstanceExtended
851 //
854
866 {
867 public:
868 friend class FShapeInstance;
869
874
876 {
877 WorldPosition = LeafWorldTransform.GetTranslation();
878 WorldRotation = LeafWorldTransform.GetRotation();
879 }
880
881 protected:
886
887 UE_DEPRECATED(5.4, "Use FShapeInstanceExtended with FImplicitObjectPtr instead")
893
898
899 // NOTE: FRotation is 16-byte aligned so it goes first
902 };
903 }
904
905
908 //
909 // Downcasts
910 //
913
915 {
917 {
918 return static_cast<FShapeInstanceProxy*>(this);
919 }
920 return nullptr;
921 }
922
924 {
926 {
927 return static_cast<const FShapeInstanceProxy*>(this);
928 }
929 return nullptr;
930 }
931
933 {
935 {
936 return static_cast<FShapeInstance*>(this);
937 }
938 return nullptr;
939 }
940
942 {
944 {
945 return static_cast<const FShapeInstance*>(this);
946 }
947 return nullptr;
948 }
949
951 {
953 {
954 return static_cast<Private::FShapeInstanceExtended*>(this);
955 }
956 return nullptr;
957 }
958
960 {
962 {
963 return static_cast<const Private::FShapeInstanceExtended*>(this);
964 }
965 return nullptr;
966 }
967
968 template<typename TLambda>
969 inline decltype(auto) FPerShapeData::DownCast(const TLambda& Lambda)
970 {
971 // NOTE: only FShapeInstanceProxy and FShapeInstance implement the full interface
972 // FShapeInstanceExtended is a hidden derived type as far as we are concerned here
973 if (Type == EPerShapeDataType::Proxy)
974 {
975 return Lambda(*AsShapeInstanceProxy());
976 }
977 else
978 {
979 return Lambda(*AsShapeInstance());
980 }
981 }
982
983 template<typename TLambda>
984 inline decltype(auto) FPerShapeData::DownCast(const TLambda& Lambda) const
985 {
986 // See comments in non-const DownCast()
987 if (Type == EPerShapeDataType::Proxy)
988 {
989 return Lambda(*AsShapeInstanceProxy());
990 }
991 else
992 {
993 return Lambda(*AsShapeInstance());
994 }
995 }
996
997
1000 //
1001 // FPerShapeData implementation
1002 //
1005
1006
1008 {
1009 DownCast([&WorldTM](auto& ShapeInstance) { ShapeInstance.UpdateShapeBounds(WorldTM); });
1010 }
1011
1012 inline void* FPerShapeData::GetUserData() const
1013 {
1014 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetUserData(); });
1015 }
1016
1018 {
1019 DownCast([InUserData](auto& ShapeInstance) { ShapeInstance.SetUserData(InUserData); });
1020 }
1021
1023 {
1024 return DownCast([](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetQueryData(); });
1025 }
1026
1031
1033 {
1034 return DownCast([](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetSimData(); });
1035 }
1036
1038 {
1039 return DownCast([&InSimData](auto& ShapeInstance) { ShapeInstance.SetSimData(InSimData); });
1040 }
1041
1043 {
1044 return Geometry.GetReference();
1045 }
1046
1051
1053 {
1054 DownCast([&WorldTransform](auto& ShapeInstance) { ShapeInstance.UpdateWorldSpaceState(WorldTransform); });
1055 }
1056
1058 {
1059 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetLeafGeometry(); });
1060 }
1061
1063 {
1064 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetLeafRelativeTransform(); });
1065 }
1066
1068 {
1069 return DownCast([Particle](auto& ShapeInstance) { return ShapeInstance.GetLeafWorldTransform(Particle); });
1070 }
1071
1073 {
1074 DownCast([Particle](auto& ShapeInstance) { ShapeInstance.UpdateLeafWorldTransform(Particle); });
1075 }
1076
1078 {
1079 return DownCast([](const auto& ShapeInstance) { return ShapeInstance.NumMaterials(); });
1080 }
1081
1083 {
1084 return DownCast([Index](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetMaterial(Index); });
1085 }
1086
1088 {
1089 return DownCast([](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetMaterials(); });
1090 }
1091
1093 {
1094 return DownCast([](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetMaterialMasks(); });
1095 }
1096
1098 {
1099 return DownCast([](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetMaterialMaskMaps(); });
1100 }
1101
1103 {
1104 return DownCast([](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetMaterialMaskMapMaterials(); });
1105 }
1106
1108 {
1109 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetDirtyFlags(); });
1110 }
1111
1116
1121
1126
1131
1136
1141
1146
1151
1156
1158 {
1159 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetQueryEnabled(); });
1160 }
1161
1162 inline void FPerShapeData::SetQueryEnabled(const bool bEnable)
1163 {
1164 DownCast([bEnable](auto& ShapeInstance) { ShapeInstance.SetQueryEnabled(bEnable); });
1165 }
1166
1168 {
1169 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetSimEnabled(); });
1170 }
1171
1172 inline void FPerShapeData::SetSimEnabled(const bool bEnable)
1173 {
1174 DownCast([bEnable](auto& ShapeInstance) { ShapeInstance.SetSimEnabled(bEnable); });
1175 }
1176
1177 inline bool FPerShapeData::GetIsProbe() const
1178 {
1179 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetIsProbe(); });
1180 }
1181
1182 inline void FPerShapeData::SetIsProbe(const bool bIsProbe)
1183 {
1184 DownCast([bIsProbe](auto& ShapeInstance) { ShapeInstance.SetIsProbe(bIsProbe); });
1185 }
1186
1188 {
1189 return DownCast([](auto& ShapeInstance) { return ShapeInstance.GetCollisionTraceType(); });
1190 }
1191
1196
1198 {
1199 return DownCast([](const auto& ShapeInstance) -> const auto& { return ShapeInstance.GetCollisionData(); });
1200 }
1201
1203 {
1204 DownCast([&Data](auto& ShapeInstance) { ShapeInstance.SetCollisionData(Data); });
1205 }
1206
1208 {
1209 return DownCast([](auto& ShapeInstance) -> const auto& { return ShapeInstance.GetMaterialData(); });
1210 }
1211
1213 {
1214 DownCast([&Data](auto& ShapeInstance) { ShapeInstance.SetMaterialData(Data); });
1215 }
1216
1221
1223 {
1224 DownCast([InProxy](auto& ShapeInstance) { ShapeInstance.SetProxy(InProxy); });
1225 }
1226
1228 {
1229 return ShapeIdx;
1230 }
1231
1236
1237 template <typename Lambda>
1239 {
1240 DownCast([&LambdaFunc](auto& ShapeInstance) { ShapeInstance.ModifySimData(LambdaFunc); });
1241 }
1242
1243 template <typename Lambda>
1245 {
1246 DownCast([&LambdaFunc](auto& ShapeInstance) { ShapeInstance.ModifyMaterials(LambdaFunc); });
1247 }
1248
1249 template <typename Lambda>
1251 {
1252 DownCast([&LambdaFunc](auto& ShapeInstance) { ShapeInstance.ModifyMaterialMasks(LambdaFunc); });
1253 }
1254
1255 template <typename Lambda>
1257 {
1258 DownCast([&LambdaFunc](auto& ShapeInstance) { ShapeInstance.ModifyMaterialMaskMaps(LambdaFunc); });
1259 }
1260
1261 template <typename Lambda>
1263 {
1264 DownCast([&LambdaFunc](auto& ShapeInstance) { ShapeInstance.ModifyMaterialMaskMapMaterials(LambdaFunc); });
1265 }
1266
1267
1270 //
1271 // Misc stuff
1272 //
1275
1276
1278 {
1279 Shape.Serialize(Ar);
1280 return Ar;
1281 }
1282
1283 UE_DEPRECATED(5.3, "Not for external use")
1284 void CHAOS_API UpdateShapesArrayFromGeometry(FShapesArray& ShapesArray, TSerializablePtr<FImplicitObject> Geometry, const FRigidTransform3& ActorTM, IPhysicsProxyBase* Proxy);
1285
1286}
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define check(expr)
Definition AssertionMacros.h:314
#define PRAGMA_DISABLE_INTERNAL_WARNINGS
Definition CoreMiscDefines.h:346
#define PRAGMA_ENABLE_INTERNAL_WARNINGS
Definition CoreMiscDefines.h:347
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define TEXT(x)
Definition Platform.h:1272
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 PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
#define UE_LOG(CategoryName, Verbosity, Format,...)
Definition LogMacros.h:270
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition ChaosArchive.h:167
Definition ParticleDirtyFlags.h:1039
Definition ImplicitObject.h:111
Definition ShapeInstance.h:36
void SetMaterial(FMaterialHandle InMaterial)
Definition ShapeInstance.h:1112
void SetQueryEnabled(const bool bEnable)
Definition ShapeInstance.h:1162
void SetMaterialData(const FMaterialData &Data)
Definition ShapeInstance.h:1212
FImplicitObjectRef GetGeometry() const
Definition ShapeInstance.h:1042
void UpdateShapeBounds(const FRigidTransform3 &WorldTM, const FVec3 &BoundsExpansion)
Definition ShapeInstance.h:86
EChaosCollisionTraceFlag GetCollisionTraceType() const
Definition ShapeInstance.h:1187
CHAOS_API void SetCombinedShapeFilterData(const Filter::FCombinedShapeFilterData &InCombinedShapeFilter)
Definition ShapeInstance.cpp:221
void UpdateWorldSpaceState(const FRigidTransform3 &WorldTransform, const FVec3 &BoundsExpansion)
Definition ShapeInstance.h:114
void SetUserData(void *InUserData)
Definition ShapeInstance.h:1017
FShapeInstance * AsShapeInstance()
Definition ShapeInstance.h:932
void SetIsProbe(const bool bIsProbe)
Definition ShapeInstance.h:1182
FPerShapeData(const EPerShapeDataType InType, int32 InShapeIdx)
Definition ShapeInstance.h:183
void ModifySimData(const Lambda &LambdaFunc)
Definition ShapeInstance.h:1238
void * GetUserData() const
Definition ShapeInstance.h:1012
CHAOS_API void SetFilterInstanceData(const Filter::FInstanceData &InInstanceData)
Definition ShapeInstance.cpp:211
const TAABB< FReal, 3 > & GetWorldSpaceShapeBounds() const
Definition ShapeInstance.h:1047
const TArray< FMaterialHandle > & GetMaterialMaskMapMaterials() const
Definition ShapeInstance.h:1102
static bool RequiresCachedLeafInfo(const FImplicitObject *Geometry)
Definition ShapeInstance.h:68
const FCollisionFilterData & GetQueryData() const
Definition ShapeInstance.h:1022
virtual void SerializeMaterials(FChaosArchive &Ar)=0
EPerShapeDataType Type
Definition ShapeInstance.h:223
EPerShapeDataType
Definition ShapeInstance.h:39
FRigidTransform3 GetLeafRelativeTransform() const
Definition ShapeInstance.h:1062
FPerShapeData(const EPerShapeDataType InType, int32 InShapeIdx, const FImplicitObjectPtr &InGeometry)
Definition ShapeInstance.h:203
bool GetIsProbe() const
Definition ShapeInstance.h:1177
EPerShapeDataType GetType() const
Definition ShapeInstance.h:45
void SetQueryData(const FCollisionFilterData &InQueryData)
Definition ShapeInstance.h:1027
CHAOS_API const Filter::FShapeFilterData GetShapeFilterData() const
Definition ShapeInstance.cpp:196
void SetMaterialMaskMaps(const TArray< uint32 > &InMaterialMaskMaps)
Definition ShapeInstance.h:1137
const TArray< FMaterialHandle > & GetMaterials() const
Definition ShapeInstance.h:1087
int32 NumMaterials() const
Definition ShapeInstance.h:1077
void ModifyMaterialMaskMapMaterials(const Lambda &LambdaFunc)
Definition ShapeInstance.h:1262
static CHAOS_API void UpdateGeometry(TUniquePtr< FPerShapeData > &InOutShapePtr, TSerializablePtr< FImplicitObject > InGeometry)
Definition ShapeInstance.cpp:191
const FImplicitObject * GetLeafGeometry() const
Definition ShapeInstance.h:1057
void UpdateShapeBounds(const FRigidTransform3 &WorldTM)
Definition ShapeInstance.h:1007
int32 GetShapeIndex() const
Definition ShapeInstance.h:1227
const FMaterialHandle & GetMaterial(const int32 Index) const
Definition ShapeInstance.h:1082
virtual CHAOS_API void Serialize(FChaosArchive &Ar)
Definition ShapeInstance.cpp:310
void SetMaterialMasks(const TArray< FMaterialMaskHandle > &InMaterialMasks)
Definition ShapeInstance.h:1127
decltype(auto) DownCast(const TLambda &Lambda)
Definition ShapeInstance.h:969
FRigidTransform3 GetLeafWorldTransform(const FGeometryParticleHandle *Particle) const
Definition ShapeInstance.h:1067
CHAOS_API void SetShapeFilterData(const Filter::FShapeFilterData &InShapeFilter)
Definition ShapeInstance.cpp:201
void SetMaterials(const TArray< FMaterialHandle > &InMaterials)
Definition ShapeInstance.h:1117
bool GetSimEnabled() const
Definition ShapeInstance.h:1167
void SyncRemoteData(FDirtyPropertiesManager &Manager, int32 ShapeDataIdx, FShapeDirtyData &RemoteData)
Definition ShapeInstance.h:1217
const TAABB< FReal, 3 > & GetWorldSpaceInflatedShapeBounds() const
Definition ShapeInstance.h:111
void SetCollisionData(const FCollisionData &Data)
Definition ShapeInstance.h:1202
void SetProxy(IPhysicsProxyBase *InProxy)
Definition ShapeInstance.h:1222
TAABB< FReal, 3 > WorldSpaceShapeBounds
Definition ShapeInstance.h:228
uint32 bIsSingleMaterial
Definition ShapeInstance.h:224
FPerShapeData(const EPerShapeDataType InType, const FPerShapeData &Other)
Definition ShapeInstance.h:212
void ModifyMaterialMasks(const Lambda &LambdaFunc)
Definition ShapeInstance.h:1250
const FMaterialData & GetMaterialData() const
Definition ShapeInstance.h:1207
const FCollisionFilterData & GetSimData() const
Definition ShapeInstance.h:1032
const TArray< FMaterialMaskHandle > & GetMaterialMasks() const
Definition ShapeInstance.h:1092
static constexpr bool AlwaysSerializable
Definition ShapeInstance.h:65
Private::FShapeInstanceExtended * AsShapeInstanceExtended()
Definition ShapeInstance.h:950
void SetSimData(const FCollisionFilterData &InSimData)
Definition ShapeInstance.h:1037
static CHAOS_API TUniquePtr< FPerShapeData > CreatePerShapeData(int32 InShapeIdx, TSerializablePtr< FImplicitObject > InGeometry)
Definition ShapeInstance.cpp:185
static CHAOS_API FPerShapeData * SerializationFactory(FChaosArchive &Ar, FPerShapeData *)
Definition ShapeInstance.cpp:335
void ModifyShapeIndex(int32 NewShapeIndex)
Definition ShapeInstance.h:1232
FShapeInstanceProxy * AsShapeInstanceProxy()
Definition ShapeInstance.h:914
void SetCollisionTraceType(const EChaosCollisionTraceFlag InTraceFlag)
Definition ShapeInstance.h:1192
void SetSimEnabled(const bool bEnable)
Definition ShapeInstance.h:1172
FImplicitObjectPtr Geometry
Definition ShapeInstance.h:227
void ModifyMaterialMaskMaps(const Lambda &LambdaFunc)
Definition ShapeInstance.h:1256
const FCollisionData & GetCollisionData() const
Definition ShapeInstance.h:1197
void UpdateLeafWorldTransform(FGeometryParticleHandle *Particle)
Definition ShapeInstance.h:1072
FShapeDirtyFlags DirtyFlags
Definition ShapeInstance.h:226
const TArray< uint32 > & GetMaterialMaskMaps() const
Definition ShapeInstance.h:1097
CHAOS_API const Filter::FCombinedShapeFilterData GetCombinedShapeFilterData() const
Definition ShapeInstance.cpp:216
const FShapeDirtyFlags GetDirtyFlags() const
Definition ShapeInstance.h:1107
void SetMaterialMaskMapMaterials(const TArray< FMaterialHandle > &InMaterialMaskMapMaterials)
Definition ShapeInstance.h:1147
void ModifyMaterials(const Lambda &LambdaFunc)
Definition ShapeInstance.h:1244
uint32 ShapeIdx
Definition ShapeInstance.h:225
bool GetQueryEnabled() const
Definition ShapeInstance.h:1157
CHAOS_API const Filter::FInstanceData GetFilterInstanceData() const
Definition ShapeInstance.cpp:206
void UpdateWorldSpaceState(const FRigidTransform3 &WorldTransform)
Definition ShapeInstance.h:1052
Definition PhysicsSolverBase.h:313
Definition ParticleDirtyFlags.h:1228
Definition ShapeInstance.h:260
CHAOS_API FRigidTransform3 GetLeafWorldTransform(const FGeometryParticleHandle *Particle) const
Definition ShapeInstance.cpp:460
void SetMaterials(TArray< FMaterialHandle > &&InMaterials)
Definition ShapeInstance.h:351
const FCollisionData & GetCollisionData() const
Definition ShapeInstance.h:407
CHAOS_API FRigidTransform3 GetLeafRelativeTransform() const
Definition ShapeInstance.cpp:445
void SetQueryData(const FCollisionFilterData &InQueryData)
Definition ShapeInstance.h:291
virtual CHAOS_API void SerializeMaterials(FChaosArchive &Ar) override final
Definition ShapeInstance.cpp:348
void SetSimData(const FCollisionFilterData &InSimData)
Definition ShapeInstance.h:297
bool GetSimEnabled() const
Definition ShapeInstance.h:389
CHAOS_API void UpdateLeafWorldTransform(FGeometryParticleHandle *Particle)
Definition ShapeInstance.cpp:474
void SetMaterials(const TArray< FMaterialHandle > &InMaterials)
Definition ShapeInstance.h:343
const FShapeDirtyFlags GetDirtyFlags() const
Definition ShapeInstance.h:332
void SetProxy(IPhysicsProxyBase *InProxy)
Definition ShapeInstance.h:429
void SetMaterialMaskMaps(const TArray< uint32 > &InMaterialMaskMaps)
Definition ShapeInstance.h:367
void SetCollisionTraceType(const EChaosCollisionTraceFlag InTraceFlag)
Definition ShapeInstance.h:402
PRAGMA_DISABLE_INTERNAL_WARNINGS const FCollisionFilterData & GetQueryData() const
Definition ShapeInstance.h:290
void ModifyMaterials(const Lambda &LambdaFunc)
Definition ShapeInstance.h:453
const TArray< uint32 > & GetMaterialMaskMaps() const
Definition ShapeInstance.h:329
PRAGMA_ENABLE_INTERNAL_WARNINGS CHAOS_API const Filter::FShapeFilterData GetShapeFilterData() const
Definition ShapeInstance.cpp:236
const TArray< FMaterialHandle > & GetMaterialMaskMapMaterials() const
Definition ShapeInstance.h:330
TShapeProperty< FCollisionData, EShapeProperty::CollisionData > CollisionData
Definition ShapeInstance.h:520
void SetMaterial(FMaterialHandle InMaterial)
Definition ShapeInstance.h:334
EChaosCollisionTraceFlag GetCollisionTraceType() const
Definition ShapeInstance.h:401
IPhysicsProxyBase * Proxy
Definition ShapeInstance.h:518
CHAOS_API void UpdateWorldSpaceState(const FRigidTransform3 &WorldTransform)
Definition ShapeInstance.cpp:435
static void UpdateGeometry(TUniquePtr< FShapeInstanceProxy > &InOutShapePtr, TSerializablePtr< FImplicitObject > InGeometry)
Definition ShapeInstance.h:272
CHAOS_API const FImplicitObject * GetLeafGeometry() const
Definition ShapeInstance.cpp:440
void ModifyMaterialMaskMaps(const Lambda &LambdaFunc)
Definition ShapeInstance.h:471
FShapeInstanceProxy(int32 InShapeIdx)
Definition ShapeInstance.h:489
void SetCollisionData(const FCollisionData &Data)
Definition ShapeInstance.h:409
void SetQueryEnabled(const bool bEnable)
Definition ShapeInstance.h:384
bool GetIsProbe() const
Definition ShapeInstance.h:395
void SetMaterialData(const FMaterialData &Data)
Definition ShapeInstance.h:416
void SetUserData(void *InUserData)
Definition ShapeInstance.h:284
CHAOS_API void UpdateShapeBounds(const FRigidTransform3 &WorldTM)
Definition ShapeInstance.cpp:423
CHAOS_API const Filter::FInstanceData GetFilterInstanceData() const
Definition ShapeInstance.cpp:246
FShapeInstanceProxy(int32 InShapeIdx, const FImplicitObjectPtr &InGeometry)
Definition ShapeInstance.h:507
void SyncRemoteData(FDirtyPropertiesManager &Manager, int32 ShapeDataIdx, FShapeDirtyData &RemoteData)
Definition ShapeInstance.h:421
void ModifyMaterialMaskMapMaterials(const Lambda &LambdaFunc)
Definition ShapeInstance.h:480
void SetSimEnabled(const bool bEnable)
Definition ShapeInstance.h:390
static CHAOS_API FShapeInstanceProxy * SerializationFactory(FChaosArchive &Ar, FShapeInstanceProxy *)
Definition ShapeInstance.cpp:342
const FMaterialData & GetMaterialData() const
Definition ShapeInstance.h:414
const FCollisionFilterData & GetSimData() const
Definition ShapeInstance.h:296
bool GetQueryEnabled() const
Definition ShapeInstance.h:383
void SetMaterialMaskMapMaterials(const TArray< FMaterialHandle > &InMaterialMaskMapMaterials)
Definition ShapeInstance.h:375
TShapeProperty< FMaterialData, EShapeProperty::Materials > Materials
Definition ShapeInstance.h:521
static TUniquePtr< FShapeInstanceProxy > Make(int32 InShapeIdx, TSerializablePtr< FImplicitObject > InGeometry)
Definition ShapeInstance.h:265
void SetMaterialMasks(const TArray< FMaterialMaskHandle > &InMaterialMasks)
Definition ShapeInstance.h:359
CHAOS_API void SetFilterInstanceData(const Filter::FInstanceData &InInstanceData)
Definition ShapeInstance.cpp:251
void * GetUserData() const
Definition ShapeInstance.h:283
void SetIsProbe(const bool bIsProbe)
Definition ShapeInstance.h:396
CHAOS_API const Filter::FCombinedShapeFilterData GetCombinedShapeFilterData() const
Definition ShapeInstance.cpp:256
CHAOS_API void SetShapeFilterData(const Filter::FShapeFilterData &InShapeFilter)
Definition ShapeInstance.cpp:241
int32 NumMaterials() const
Definition ShapeInstance.h:324
void ModifyMaterialMasks(const Lambda &LambdaFunc)
Definition ShapeInstance.h:462
const FMaterialHandle & GetMaterial(const int32 Index) const
Definition ShapeInstance.h:325
void ModifySimData(const Lambda &LambdaFunc)
Definition ShapeInstance.h:445
const TArray< FMaterialHandle > & GetMaterials() const
Definition ShapeInstance.h:327
CHAOS_API void SetCombinedShapeFilterData(const Filter::FCombinedShapeFilterData &InCombinedShapeFilter)
Definition ShapeInstance.cpp:261
const TArray< FMaterialMaskHandle > & GetMaterialMasks() const
Definition ShapeInstance.h:328
Definition ShapeInstance.h:554
void SetSimData(const FCollisionFilterData &InSimData)
Definition ShapeInstance.h:580
const TArray< FMaterialMaskHandle > & GetMaterialMasks() const
Definition ShapeInstance.h:658
const FMaterialHandle & GetMaterial(const int32 Index) const
Definition ShapeInstance.h:616
void SetMaterials(TArray< FMaterialHandle > &&InMaterials)
Definition ShapeInstance.h:664
const TArray< FMaterialHandle > & GetMaterials() const
Definition ShapeInstance.h:657
CHAOS_API const Filter::FInstanceData GetFilterInstanceData() const
Definition ShapeInstance.cpp:394
FShapeInstance(const EPerShapeDataType InType, FShapeInstance &&Other)
Definition ShapeInstance.h:753
void SetMaterialData(const FMaterialData &Data)
Definition ShapeInstance.h:685
void SetSimEnabled(const bool bEnable)
Definition ShapeInstance.h:673
void SyncRemoteData(FDirtyPropertiesManager &Manager, int32 ShapeDataIdx, FShapeDirtyData &RemoteData)
Definition ShapeInstance.h:689
void SetMaterialMaskMaps(const TArray< uint32 > &InMaterialMaskMaps)
Definition ShapeInstance.h:666
CHAOS_API void UpdateShapeBounds(const FRigidTransform3 &WorldTM)
Definition ShapeInstance.cpp:487
static CHAOS_API void UpdateGeometry(TUniquePtr< FShapeInstance > &InOutShapePtr, const FImplicitObjectPtr &InGeometry)
Definition ShapeInstance.cpp:280
CHAOS_API const Filter::FCombinedShapeFilterData GetCombinedShapeFilterData() const
Definition ShapeInstance.cpp:404
void * GetUserData() const
Definition ShapeInstance.h:572
const FMaterialData & GetMaterialData() const
Definition ShapeInstance.h:684
void SetUserData(void *InUserData)
Definition ShapeInstance.h:573
void SetIsProbe(const bool bIsProbe)
Definition ShapeInstance.h:676
CHAOS_API void UpdateLeafWorldTransform(FGeometryParticleHandle *Particle)
Definition ShapeInstance.cpp:569
void ModifyMaterialMasks(const Lambda &LambdaFunc)
Definition ShapeInstance.h:696
CHAOS_API FRigidTransform3 GetLeafWorldTransform(const FGeometryParticleHandle *Particle) const
Definition ShapeInstance.cpp:548
bool GetSimEnabled() const
Definition ShapeInstance.h:672
FMaterialData & GetMaterialDataImpl()
Definition ShapeInstance.h:768
void ModifyMaterialMaskMapMaterials(const Lambda &LambdaFunc)
Definition ShapeInstance.h:698
CHAOS_API void SetShapeFilterData(const Filter::FShapeFilterData &InShapeFilter)
Definition ShapeInstance.cpp:389
FShapeInstance(int32 InShapeIdx, const FImplicitObjectPtr &InGeometry)
Definition ShapeInstance.h:716
PRAGMA_DISABLE_DEPRECATION_WARNINGS void ModifySimData(const Lambda &LambdaFunc)
Definition ShapeInstance.h:693
FShapeInstance(FShapeInstance &&Other)
Definition ShapeInstance.h:723
static CHAOS_API FShapeInstance * SerializationFactory(FChaosArchive &Ar, FShapeInstance *)
Definition ShapeInstance.cpp:353
void SetQueryData(const FCollisionFilterData &InQueryData)
Definition ShapeInstance.h:577
CHAOS_API void SetCombinedShapeFilterData(const Filter::FCombinedShapeFilterData &InCombinedShapeFilter)
Definition ShapeInstance.cpp:409
CHAOS_API void SetFilterInstanceData(const Filter::FInstanceData &InInstanceData)
Definition ShapeInstance.cpp:399
PRAGMA_ENABLE_INTERNAL_WARNINGS CHAOS_API const Filter::FShapeFilterData GetShapeFilterData() const
Definition ShapeInstance.cpp:384
void SetProxy(IPhysicsProxyBase *InProxy)
Definition ShapeInstance.h:690
void SetCollisionData(const FCollisionData &Data)
Definition ShapeInstance.h:682
void SetMaterialMasks(const TArray< FMaterialMaskHandle > &InMaterialMasks)
Definition ShapeInstance.h:665
const FCollisionFilterData & GetSimData() const
Definition ShapeInstance.h:579
void SetMaterialMaskMapMaterials(const TArray< FMaterialHandle > &InMaterialMaskMapMaterials)
Definition ShapeInstance.h:667
void SetQueryEnabled(const bool bEnable)
Definition ShapeInstance.h:670
const TArray< FMaterialHandle > & GetMaterialMaskMapMaterials() const
Definition ShapeInstance.h:660
FMaterialUnion Material
Definition ShapeInstance.h:840
virtual CHAOS_API void SerializeMaterials(FChaosArchive &Ar) override final
Definition ShapeInstance.cpp:359
CHAOS_API void UpdateWorldSpaceState(const FRigidTransform3 &WorldTransform)
Definition ShapeInstance.cpp:499
const TArray< uint32 > & GetMaterialMaskMaps() const
Definition ShapeInstance.h:659
static CHAOS_API TUniquePtr< FShapeInstance > Make(int32 InShapeIdx, const FImplicitObjectPtr &InGeometry)
Definition ShapeInstance.cpp:267
void ModifyMaterialMaskMaps(const Lambda &LambdaFunc)
Definition ShapeInstance.h:697
const FCollisionData & GetCollisionData() const
Definition ShapeInstance.h:681
CHAOS_API const FImplicitObject * GetLeafGeometry() const
Definition ShapeInstance.cpp:528
const FMaterialData & GetMaterialDataImpl() const
Definition ShapeInstance.h:791
PRAGMA_ENABLE_DEPRECATION_WARNINGS void ModifyMaterials(const Lambda &LambdaFunc)
Definition ShapeInstance.h:695
int32 NumMaterialsInternal(const THandleArray< FChaosPhysicsMaterial > *const SimMaterials) const
Definition ShapeInstance.h:630
const FMaterialHandle & GetMaterialInternal(const int32 Index, const THandleArray< FChaosPhysicsMaterial > *const SimMaterials) const
Definition ShapeInstance.h:642
FCollisionData CollisionData
Definition ShapeInstance.h:839
int32 NumMaterials() const
Definition ShapeInstance.h:604
bool GetQueryEnabled() const
Definition ShapeInstance.h:669
bool GetIsProbe() const
Definition ShapeInstance.h:675
virtual ~FShapeInstance()
Definition ShapeInstance.h:562
const FShapeDirtyFlags GetDirtyFlags() const
Definition ShapeInstance.h:688
void SetMaterialDataImpl(const FMaterialData &Data)
Definition ShapeInstance.h:811
void SetMaterialImpl(const FMaterialHandle &InMaterial)
Definition ShapeInstance.h:796
void SetMaterials(const TArray< FMaterialHandle > &InMaterials)
Definition ShapeInstance.h:663
EChaosCollisionTraceFlag GetCollisionTraceType() const
Definition ShapeInstance.h:678
void SetMaterial(FMaterialHandle InMaterial)
Definition ShapeInstance.h:662
void SetCollisionTraceType(const EChaosCollisionTraceFlag InTraceFlag)
Definition ShapeInstance.h:679
FShapeInstance(int32 InShapeIdx)
Definition ShapeInstance.h:701
CHAOS_API FRigidTransform3 GetLeafRelativeTransform() const
Definition ShapeInstance.cpp:533
PRAGMA_DISABLE_INTERNAL_WARNINGS const FCollisionFilterData & GetQueryData() const
Definition ShapeInstance.h:576
FShapeInstance(const EPerShapeDataType InType, int32 InShapeIdx, FImplicitObjectPtr InGeometry)
Definition ShapeInstance.h:746
Definition ShapeInstance.h:866
FShapeInstanceExtended(FShapeInstance &&PerShapeData)
Definition ShapeInstance.h:894
FRigidTransform3 GetWorldTransform() const
Definition ShapeInstance.h:870
FVec3 WorldPosition
Definition ShapeInstance.h:901
FRotation3 WorldRotation
Definition ShapeInstance.h:900
void SetWorldTransform(const FRigidTransform3 &LeafWorldTransform)
Definition ShapeInstance.h:875
FShapeInstanceExtended(int32 InShapeIdx, FImplicitObjectPtr InGeometry)
Definition ShapeInstance.h:882
Definition AABB.h:37
bool IsDirty() const
Definition ParticleDirtyFlags.h:922
void Clear()
Definition ParticleDirtyFlags.h:947
Definition ParticleHandle.h:436
Definition Handles.h:152
Definition Serializable.h:10
Definition Properties.h:101
Definition PhysicsProxyBase.h:97
SOLVER_TYPE * GetSolver() const
Definition PhysicsProxyBase.h:110
Definition Array.h:670
UE_FORCEINLINE_HINT ReferencedType * GetReference() const
Definition RefCounting.h:584
Definition UniquePtr.h:107
Definition SkeletalMeshComponent.h:307
TArray< TUniquePtr< FPerShapeData >, TInlineAllocator< 1 > > FShapesArray
Definition ShapeInstanceFwd.h:18
TRigidTransform< FReal, 3 > FRigidTransform3
Definition Core.h:22
FChaosArchive & operator<<(FChaosArchive &Ar, FRigidParticleControlFlags &Flags)
Definition RigidParticleControlFlags.cpp:15
void UpdateShapesArrayFromGeometry(FShapeInstanceArray &ShapesArray, const FImplicitObjectPtr &Geometry, const FRigidTransform3 &ActorTM)
Definition ShapeInstance.cpp:90
FRealDouble FReal
Definition Real.h:22
TDirtyFlags< EShapeFlags > FShapeDirtyFlags
Definition ParticleDirtyFlags.h:967
EChaosCollisionTraceFlag
Definition Particles.h:231
Definition OverriddenPropertySet.cpp:45
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition ParticleDirtyFlags.h:722
EChaosCollisionTraceFlag CollisionTraceType
Definition ParticleDirtyFlags.h:729
uint8 bSimCollision
Definition ParticleDirtyFlags.h:730
PRAGMA_ENABLE_DEPRECATION_WARNINGS UE_INTERNAL CHAOS_API const FCollisionFilterData & GetQueryData() const
Definition ParticleDirtyFlags.cpp:7
FCollisionFilterData SimData
Definition ParticleDirtyFlags.h:726
UE_INTERNAL CHAOS_API void SetQueryData(const FCollisionFilterData &InQueryData)
Definition ParticleDirtyFlags.cpp:14
uint8 bIsProbe
Definition ParticleDirtyFlags.h:732
UE_INTERNAL CHAOS_API void SetSimData(const FCollisionFilterData &InSimData)
Definition ParticleDirtyFlags.cpp:28
void * UserData
Definition ParticleDirtyFlags.h:728
UE_INTERNAL CHAOS_API const FCollisionFilterData & GetSimData() const
Definition ParticleDirtyFlags.cpp:21
uint8 bQueryCollision
Definition ParticleDirtyFlags.h:731
Definition ParticleDirtyFlags.h:827
TArray< FMaterialMaskHandle > MaterialMasks
Definition ParticleDirtyFlags.h:829
TArray< FMaterialHandle > MaterialMaskMapMaterials
Definition ParticleDirtyFlags.h:831
TArray< FMaterialHandle > Materials
Definition ParticleDirtyFlags.h:828
TArray< uint32 > MaterialMaskMaps
Definition ParticleDirtyFlags.h:830
Definition PhysicalMaterials.h:24
bool IsValidInternal(const THandleArray< FChaosPhysicsMaterial > *const SimMaterials) const
Definition PhysicalMaterials.h:32
bool IsValid() const
Definition PhysicalMaterials.h:31
Definition CollisionFilterData.h:187
Definition CollisionFilterData.h:81
Definition CollisionFilterData.h:107
Definition CollisionFilterData.h:46
Definition ShapeInstance.h:831
~FMaterialUnion()
Definition ShapeInstance.h:833
FMaterialUnion()
Definition ShapeInstance.h:832
FMaterialHandle MaterialHandle
Definition ShapeInstance.h:835
FMaterialData * MaterialData
Definition ShapeInstance.h:836