UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ChaosBreakingEventFilter.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
6#include "ChaosFilter.h"
7#include "EventsData.h"
8#include "ChaosBreakingEventFilter.generated.h"
9
10// A breaking event data structure.
11USTRUCT(BlueprintType)
13{
15
16 // Location of the breaking event (centroid)
17 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Data")
18 FVector Location;
19
20 // The velocity of the breaking event
21 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Data")
23
24 // The mass of the breaking event
25 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Data")
26 float Mass;
27
29 : Location(FVector::ZeroVector)
30 , Velocity(FVector::ZeroVector)
31 , Mass(0.0f)
32 {
33 }
34};
35
36// Enumeration defining how to sort breaking results
37UENUM(BlueprintType)
47
48// Settings used to refine breaking event requests
49USTRUCT(BlueprintType)
51{
53
54
55 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Filters")
56 int32 MaxNumberOfResults;
57
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Filters")
60 float MinRadius;
61
63 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Filters")
64 float MinSpeed;
65
67 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Filters")
68 float MinMass;
69
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Filters")
73
75 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Sort")
77
79 : MaxNumberOfResults(0)
80 , MinRadius(0.0f)
81 , MinSpeed(0.0f)
82 , MinMass(0.0f)
83 , MaxDistance(0.0f)
85 {}
86};
87
88class FChaosBreakingEventFilter : public IChaosEventFilter<Chaos::FBreakingDataArray, TArray<FChaosBreakingEventData>, EChaosBreakingSortMethod>
89{
90public:
92
94
96
97private:
98 FChaosBreakingEventFilter() : BreakingEventRequestSettings(nullptr) {}
99 const FChaosBreakingEventRequestSettings* BreakingEventRequestSettings;
100};
EChaosBreakingSortMethod
Definition ChaosBreakingEventFilter.h:39
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
void Sort(T *First, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:78
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition ChaosBreakingEventFilter.h:89
virtual GEOMETRYCOLLECTIONENGINE_API void FilterEvents(const FTransform &ChaosComponentTransform, const Chaos::FBreakingDataArray &RawBreakingDataArray) override
Definition ChaosBreakingEventFilter.cpp:6
FChaosBreakingEventFilter(FChaosBreakingEventRequestSettings *FilterSettingsIn)
Definition ChaosBreakingEventFilter.h:91
virtual GEOMETRYCOLLECTIONENGINE_API void SortEvents(TArray< FChaosBreakingEventData > &InOutBreakingEvents, EChaosBreakingSortMethod SortMethod, const FTransform &InTransform) override
Definition ChaosBreakingEventFilter.cpp:56
Definition ChaosFilter.h:11
Definition ChaosBreakingEventFilter.h:13
Definition ChaosBreakingEventFilter.h:51