UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GeometryParticlesfwd.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
5#include "Chaos/Real.h"
6
7namespace Chaos
8{
9 //Used for down casting when iterating over multiple SOAs.
10 enum class EParticleType : uint8
11 {
12 Static,
14 Rigid,
15 Clustered, //only applicable on physics thread side
20 };
21
23 {
25 Other
26 };
27
28 enum class ESyncState: uint8
29 {
30 InSync, //in sync with recorded data
31 //SoftDesync, //recorded data still matches, but may interact with hard desynced particles
32 HardDesync, //recorded data mismatches, must run collision detection again
33 };
34
36 {
38
41 {
42
43 }
44 };
45
46 template<class T, int d, EGeometryParticlesSimType SimType>
47 class TGeometryParticlesImp;
48
49 template <typename T, int d>
51
53
54 template <typename T, int d>
56
57
59 {
62
63 static constexpr uint16 MaxBucketEntries = 1 << 13;
64 static constexpr uint16 MaxBuckets = 1 << 3;
65
68
69 bool operator==(const FSpatialAccelerationIdx& Rhs) const
70 {
71 return ((const uint16&)*this) == ((const uint16&)Rhs);
72 }
73 };
74
76 {
77 return ::GetTypeHash((const uint16&) Idx);
78 }
79
81 {
82 return Ar << (uint16&)Idx;
83 }
84
85
87 {
91
92 bool IsValid() const { return Idx != INDEX_NONE; }
93 bool operator<(const FUniqueIdx& Other) const { return Idx < Other.Idx; }
94 bool operator==(const FUniqueIdx& Other) const { return Idx == Other.Idx; }
95 };
96
98 {
99 return ::GetTypeHash(Unique.Idx);
100 }
101
102 //Used for down casting when iterating over multiple SOAs.
104 {
105 None,
107 Dynamic,
109 };
110
115 {
116 None = 0,
117
118 //
119 // NOTE: The contents of this enum match the members of FPBDRigidsSOA
120 //
121
122 // Particle containers (each particle can only be in one of these by definition)
123 StaticParticles = 1 << 0,
125 KinematicParticles = 1 << 2,
128 DynamicParticles = 1 << 5,
130 ClusteredParticles = 1 << 7,
132
133 // Particle lists (each particle can be zero or more of these, depending on state
138 ActiveParticlesMapArray = 1 << 13,
139 TransientDirtyMapArray = 1 << 14,
140 MovingKinematicsMapArray = 1 << 15,
141 StaticClusteredMapArray = 1 << 16,
143 DynamicClusteredMapArray = 1 << 19,
145 ResimDynamicParticles = 1 << 21,
147 ResimStaticParticles = 1 << 23,
148 ResimKinematicParticles = 1 << 24,
149 };
151}
#define FORCEINLINE
Definition AndroidPlatform.h:140
@ 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
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 GeometryParticles.h:152
Definition Archive.h:1208
Definition SkeletalMeshComponent.h:307
EParticleType
Definition GeometryParticlesfwd.h:11
ESyncState
Definition GeometryParticlesfwd.h:29
EInternalClusterType
Definition GeometryParticlesfwd.h:104
FChaosArchive & operator<<(FChaosArchive &Ar, FRigidParticleControlFlags &Flags)
Definition RigidParticleControlFlags.cpp:15
EGeometryParticlesSimType
Definition GeometryParticlesfwd.h:23
FORCEINLINE uint32 GetTypeHash(const FParticleID &Unique)
Definition GeometryParticles.h:99
EGeometryParticleListMask
Definition GeometryParticlesfwd.h:115
@ Dynamic
Definition SpatialAccelerationCollection.h:22
@ InSync
Definition RewindData.h:946
Definition GeometryParticlesfwd.h:59
static constexpr uint16 MaxBucketEntries
Definition GeometryParticlesfwd.h:63
uint16 InnerIdx
Definition GeometryParticlesfwd.h:61
static constexpr uint16 MaxBuckets
Definition GeometryParticlesfwd.h:64
bool operator==(const FSpatialAccelerationIdx &Rhs) const
Definition GeometryParticlesfwd.h:69
FSpatialAccelerationIdx(uint16 inBucket, uint16 inInnerIdx)
Definition GeometryParticlesfwd.h:67
uint16 Bucket
Definition GeometryParticlesfwd.h:60
FSpatialAccelerationIdx()
Definition GeometryParticlesfwd.h:66
Definition GeometryParticlesfwd.h:36
ESyncState State
Definition GeometryParticlesfwd.h:37
FSyncState()
Definition GeometryParticlesfwd.h:39
Definition GeometryParticlesfwd.h:87
FUniqueIdx()
Definition GeometryParticlesfwd.h:89
int32 Idx
Definition GeometryParticlesfwd.h:88
bool IsValid() const
Definition GeometryParticlesfwd.h:92
bool operator==(const FUniqueIdx &Other) const
Definition GeometryParticlesfwd.h:94
FUniqueIdx(int32 InIdx)
Definition GeometryParticlesfwd.h:90
bool operator<(const FUniqueIdx &Other) const
Definition GeometryParticlesfwd.h:93