7#include "PointWeightMap.generated.h"
37#if WITH_EDITORONLY_DATA
45#if WITH_EDITORONLY_DATA
51 Values.Init(
Value, NumPoints);
64#if WITH_EDITORONLY_DATA
71 Values.SetNumUninitialized(NumPoints);
87 Values.Init(0.f, NumPoints);
88#if WITH_EDITORONLY_DATA
100 UE_REQUIRES(std::is_enum_v<T> || std::is_arithmetic_v<T>)
104 Values = Source.Values;
105#if WITH_EDITORONLY_DATA
106 CurrentTarget = (
uint8)Target;
117 {
return Values.Num(); }
124 {
return Values[
Index]; }
131 {
return Values[
Index]; }
138 {
return Values.IsValidIndex(
Index) ? Values[
Index] : 0.f; }
154 {
return Values.IsValidIndex(
Index) && Values[
Index] <= Threshold; }
158 {
return IsBelowThreshold(
Index0, Threshold) || IsBelowThreshold(Index1, Threshold) || IsBelowThreshold(Index2, Threshold); }
162 {
return IsBelowThreshold(
Index0, Threshold) && IsBelowThreshold(Index1, Threshold) && IsBelowThreshold(Index2, Threshold); }
166 {
return !Values.FindByPredicate([](
const float&
Value) {
return Value != 0.f; }); }
170 { MinValue = FMath::Min(Values); MaxValue = FMath::Max(Values); }
176#if WITH_EDITORONLY_DATA
#define WITH_EDITORONLY_DATA
Definition CoreMiscDefines.h:24
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
EWeightMapTargetCommon
Definition PointWeightMap.h:12
#define UE_REQUIRES(...)
Definition Requires.h:86
uint32 Offset
Definition VulkanMemory.cpp:4033
if(Failed) console_printf("Failed.\n")
Definition NameTypes.h:617
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition PointWeightMap.h:33
~FPointWeightMap()
Definition PointWeightMap.h:78
void SetValue(int32 Index, float Value)
Definition PointWeightMap.h:145
FPointWeightMap(int32 NumPoints, float Value=0.f)
Definition PointWeightMap.h:44
float GetValue(int32 Index) const
Definition PointWeightMap.h:137
const float & operator[](int32 Index) const
Definition PointWeightMap.h:123
float & operator[](int32 Index)
Definition PointWeightMap.h:130
void CalcRanges(float &MinValue, float &MaxValue)
Definition PointWeightMap.h:169
bool AreAllBelowThreshold(const int32 Index0, const int32 Index1, const int32 Index2, const float Threshold=0.1f) const
Definition PointWeightMap.h:161
bool AreAnyBelowThreshold(const int32 Index0, const int32 Index1, const int32 Index2, const float Threshold=0.1f) const
Definition PointWeightMap.h:157
bool IsZeroed() const
Definition PointWeightMap.h:165
void Initialize(const FPointWeightMap &Source, T Target)
Definition PointWeightMap.h:102
void Empty()
Definition PointWeightMap.h:112
FPointWeightMap()
Definition PointWeightMap.h:36
int32 Num() const
Definition PointWeightMap.h:116
FPointWeightMap(const TConstArrayView< float > &InValues)
Definition PointWeightMap.h:54
FPointWeightMap(const TConstArrayView< float > &InValues, float Offset, float Scale)
Definition PointWeightMap.h:63
bool IsBelowThreshold(const int32 Index, const float Threshold=0.1f) const
Definition PointWeightMap.h:153
void Initialize(const int32 NumPoints)
Definition PointWeightMap.h:85