UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CollisionResolutionTypes.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#include "Chaos/ObjectPool.h"
7
8// Whether to use a pool for MidPhases and Collision Constraints
9#define CHAOS_COLLISION_OBJECTPOOL_ENABLED 1
10#define CHAOS_MIDPHASE_OBJECTPOOL_ENABLED 0
11
12namespace Chaos
13{
14 namespace Private
15 {
16 template<typename T> class TConvexContactPoint;
19
20 enum class EConvexFeatureType : int8;
21 }
22
23 // Float and Double versions of ContactPoint
24 template<typename T> class TContactPoint;
26 using FContactPointf = TContactPoint<FRealSingle>;
27
28 // C-Style array type
29 template<typename T, int32 N> class TCArray;
30
31 // A set of contact points for a manifold (standard size is up to 4 contacts)
33
34 // A set of contact points for a manifold that may be more than 4 points
36
37
40 {
41 Any, //stop if we have at least one deep penetration. Does not compute location or normal
42 Deepest //find the deepest penetration. Compute location and normal
43 };
44
47 {
48 Unchanged,
49 Modified,
50 Disabled,
51 };
52
82
85 {
86 // Ignore collisions
88
89 // Collide using particle's regular shapes
91
92 // Collide as spheres
94 };
95
96 //
97 //
98 //
99
100 class FCollisionContext;
101 class FGenericParticlePairMidPhase;
102 class FParticlePairMidPhase;
103 class FPBDCollisionConstraints;
104 class FPBDCollisionConstraint;
105 class FPBDCollisionConstraintHandle;
106 class FPerShapeData;
107 class FShapePairParticlePairMidPhase;
108
109// Collision and MidPhases are stored in an ObjectPool (if CHAOS_COLLISION_OBJECTPOOL_ENABLED or CHAOS_MIDPHASE_OBJECTPOOL_ENABLED is set).
110// @see FCollisionConstraintAllocator
111#if CHAOS_COLLISION_OBJECTPOOL_ENABLED
115#else
117#endif
118
119#if CHAOS_MIDPHASE_OBJECTPOOL_ENABLED
120 // Not yet supported due to awkwardness of defining a deleter for FParticlePairMidPhasePtr when we have pools of derived types.
121 // We probably need a custom deleter (not TObjectPoolDeleter) and to store a pointer to the CollisionConstraintAllocator.
122 static_assert(false, "CHAOS_MIDPHASE_OBJECTPOOL_ENABLED not supported yet")
127#else
129#endif
130}
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
A c-style array of objects with non-shipping bounds checking.
Definition UncheckedArray.h:47
Definition ObjectPool.h:566
Definition ObjectPool.h:25
Definition Array.h:670
TConvexContactPoint< FRealSingle > FConvexContactPointf
Definition ConvexContactPoint.h:69
TConvexContactPoint< FReal > FConvexContactPoint
Definition ConvexContactPoint.h:68
EConvexFeatureType
Definition ConvexFeature.h:11
Definition SkeletalMeshComponent.h:307
TContactPoint< FRealSingle > FContactPointf
Definition ContactPoint.h:89
ECollisionUpdateType
Definition CollisionResolutionTypes.h:40
EOneWayInteractionPairCollisionMode
Definition CollisionResolutionTypes.h:85
EContactShapesType
Definition CollisionResolutionTypes.h:55
TContactPoint< FReal > FContactPoint
Definition GJKContactPointSwept.h:11
@ Disabled
Definition SimulationModuleBase.h:138
ECollisionModifierResult
Definition CollisionResolutionTypes.h:47
Definition OverriddenPropertySet.cpp:45