5#include "CoreMinimal.h"
6#include "Net/Serialization/FastArraySerializer.h"
7#include "IVSmokeHoleShaders.h"
8#include "IVSmokeHoleData.generated.h"
26 UPROPERTY(EditAnywhere, Category =
"Noise", meta = (Tooltip =
"Noise texture for shape distortion."))
27 TObjectPtr<UTexture2D> Texture;
30 UPROPERTY(EditAnywhere, Category = "Noise", meta = (ClampMin = "0.0", ClampMax = "1.0",
31 Tooltip = "Noise strength. 0 = no noise, 1 = full effect."))
32 float Strength = 0.0f;
35 UPROPERTY(EditAnywhere, Category = "Noise", meta = (ClampMin = "0.1", ClampMax = "2.0",
36 Tooltip = "Noise UV scale. Higher = more detailed patterns."))
51 TWeakObjectPtr<AActor> TargetActor;
59 FVector3f LastWorldPosition = FVector3f::ZeroVector;
63 FQuat LastWorldRotation = FQuat::Identity;
66 FORCEINLINE
bool IsValid()
const {
return TargetActor.
IsValid(); }
101 float ExpirationServerTime = 0.0f;
108 FORCEINLINE
bool IsExpired(const
float CurrentServerTime)
const {
return CurrentServerTime >= ExpirationServerTime; }
124 UPROPERTY(Transient, VisibleAnywhere, Category =
"IVSmoke | Hole")
125 TArray<FIVSmokeHoleData> Items;
129 UPROPERTY(Transient, NotReplicated)
133 bool NetDeltaSerialize(FNetDeltaSerializeInfo& DeltaParms)
135 return FFastArraySerializer::FastArrayDeltaSerialize<FIVSmokeHoleData, FIVSmokeHoleArray>(
136 Items, DeltaParms, *
this
144 MarkItemDirty(Items.Last());
150 if (Items.IsValidIndex(Index))
152 Items.RemoveAtSwap(Index);
158 FORCEINLINE int32
Num()
const {
return Items.Num(); }
161 FORCEINLINE
bool IsValidIndex(
const int32 Index)
const {
return Items.IsValidIndex(Index); }
170 FORCEINLINE
void Reserve(
const int32 Number) { Items.Reserve(Number); }
176 TArray<FIVSmokeHoleGPU> GetHoleGPUData(
const float CurrentServerTime)
const;
181struct TStructOpsTypeTraits<
FIVSmokeHoleArray> :
public TStructOpsTypeTraitsBase2<FIVSmokeHoleArray>
185 WithNetDeltaSerializer =
true,
Component that generates hole texture for volumetric smoke. Provides public API for penetration and e...
Fast TArray container for delta replication of hole data.
FORCEINLINE bool IsValidIndex(const int32 Index) const
FORCEINLINE const FIVSmokeHoleData & operator[](const int32 Index) const
void RemoveAtSwap(const int32 Index)
void AddHole(const FIVSmokeHoleData &NewHole)
FORCEINLINE void Reserve(const int32 Number)
FORCEINLINE FIVSmokeHoleData & operator[](const int32 Index)
FORCEINLINE int32 Num() const
Network-optimized hole data structure.
Dynamic hole generated type data structure.
FORCEINLINE bool IsValid() const
Built from FIVSmokeHoleData + UIVSmokeHolePreset at render time.
Noise settings for hole shape distortion.