UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
HeterogeneousVolumeComponent.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "EngineDefines.h"
9#include "Misc/Guid.h"
10#include "RenderResource.h"
11
12#include "HeterogeneousVolumeComponent.generated.h"
13
15
19UCLASS(Blueprintable, ClassGroup = (Rendering, Common), hidecategories = (Object, Activation, "Components|Activation"), ShowCategories = (Mobility), editinlinenew, meta = (BlueprintSpawnableComponent),MinimalAPI)
21{
23
24 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Volume)
25 FIntVector VolumeResolution;
26
27 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Animation, AdvancedDisplay)
28 FTransform FrameTransform;
29
30 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation, meta = (EditCondition = "bPlaying == false"))
31 float Frame;
32
33 UPROPERTY(EditAnywhere, Category = Animation)
34 float FrameRate;
35
36 UPROPERTY(EditAnywhere, Category = Animation)
37 float StartFrame;
38
39 UPROPERTY(EditAnywhere, Category = Animation)
40 float EndFrame;
41
42 UPROPERTY(EditAnywhere, Category = Animation)
43 uint32 bPlaying : 1;
44
45 UPROPERTY(EditAnywhere, Category = Animation)
46 uint32 bLooping : 1;
47
48 // Bias to apply to the calculated mip level to stream at. This property essentially influences the distance from the
49 // volume at which certain mip levels are no longer requested. Higher values result in earlier mip level transitions.
50 UPROPERTY(EditAnywhere, Category = SparseVolumeTextureStreaming, AdvancedDisplay)
51 float StreamingMipBias;
52
53 UPROPERTY(EditAnywhere, Category = SparseVolumeTextureStreaming)
55
56 UPROPERTY(EditAnywhere, Category = Volume)
57 uint32 bPivotAtCentroid : 1;
58
59 UPROPERTY(EditAnywhere, Category = Lighting)
60 float StepFactor;
61
62 UPROPERTY(EditAnywhere, Category = Lighting)
63 float ShadowStepFactor;
64
65 UPROPERTY(EditAnywhere, Category = Lighting)
66 float ShadowBiasFactor;
67
68 UPROPERTY(EditAnywhere, Category = Lighting)
69 float LightingDownsampleFactor;
70
73
74 UFUNCTION(BlueprintCallable, Category = "Volume")
76
77 UFUNCTION(BlueprintCallable, Category = "Animation")
78 ENGINE_API void SetFrame(float NewValue);
79
80 UFUNCTION(BlueprintCallable, Category = "Animation")
81 ENGINE_API void SetFrameRate(float NewValue);
82
83 UFUNCTION(BlueprintCallable, Category = "Animation")
84 ENGINE_API void SetStartFrame(float NewValue);
85
86 UFUNCTION(BlueprintCallable, Category = "Animation")
87 ENGINE_API void SetEndFrame(float NewValue);
88
89 UFUNCTION(BlueprintCallable, Category = "Animation")
90 ENGINE_API void SetPlaying(bool NewValue);
91
92 UFUNCTION(BlueprintCallable, Category = "Animation")
93 ENGINE_API void SetLooping(bool NewValue);
94
95 UFUNCTION(BlueprintCallable, Category = "Animation")
96 ENGINE_API void Play();
97
98 UFUNCTION(BlueprintCallable, Category = "SparseVolumeTextureStreaming")
100
102
103public:
104 //~ Begin USceneComponent Interface.
105 virtual FBoxSphereBounds CalcBounds(const FTransform& LocalToWorld) const override;
106 virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
107
108 virtual void PostLoad() override;
109 virtual void PostInitProperties() override;
110 virtual void PostReinitProperties() override;
111#if WITH_EDITOR
112 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
113#endif // WITH_EDITOR
114 //~ End USceneComponent Interface.
115
116 //~ Begin UPrimitiveComponent Interface.
117 virtual FPrimitiveSceneProxy* CreateSceneProxy() override;
118 virtual bool ShouldRenderSelected() const override { return true; }
119 virtual bool IsMaterialSlotNameValid(FName MaterialSlotName) const override;
120 //~ End UPrimitiveComponent Interface.
121
122 //~ Begin UMeshComponent Interface.
123 virtual int32 GetNumMaterials() const override { return 1; }
124 virtual int32 GetMaterialIndex(FName MaterialSlotName) const override;
125 virtual void SetMaterial(int32 ElementIndex, class UMaterialInterface* Material) override;
126 virtual void GetUsedMaterials(TArray<UMaterialInterface*>& OutMaterials, bool bGetDebugMaterials = false) const override;
127 //~ End UMeshComponent Interface.
128
129private:
131
132 static USparseVolumeTexture* GetSparseVolumeTexture(UMaterialInterface* MaterialInterface, int32 ParameterIndex, FName* OutParamName = nullptr);
135 UMaterialInterface* GetHeterogeneousVolumeMaterial() const; // Gets the UMaterialInterface* returned by GetMaterial(0), but returns nullptr if the material is incompatible with HeterogeneousVolumes.
136};
137
141UCLASS(showcategories = (Movement, Rendering, Transformation, DataLayers, "Input|MouseInput", "Input|TouchInput"), ClassGroup = Fog, hidecategories = (Info, Object, Input), MinimalAPI)
142class AHeterogeneousVolume : public AInfo
143{
145
146private:
147
148 UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = Volume, meta = (AllowPrivateAccess = "true"))
150
151#if WITH_EDITOR
152 virtual bool ActorTypeSupportsDataLayer() const override { return true; }
153#endif
154
155};
int Volume
Definition AndroidPlatformMisc.cpp:380
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
ELevelTick
Definition EngineBaseTypes.h:70
return true
Definition ExternalRpcRegistry.cpp:601
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition PrimitiveSceneProxy.h:296
Definition Array.h:670
Definition MaterialInstanceDynamic.h:15
Definition MaterialInterface.h:296
Definition MeshComponent.h:25
virtual ENGINE_API void GetUsedMaterials(TArray< UMaterialInterface * > &OutMaterials, bool bGetDebugMaterials=false) const override
Definition MeshComponent.cpp:281
virtual ENGINE_API void SetMaterial(int32 ElementIndex, UMaterialInterface *Material) override
Definition MeshComponent.cpp:63
virtual ENGINE_API int32 GetNumMaterials() const override
Definition MeshComponent.cpp:276
Definition SparseVolumeTexture.h:309
ENGINE_API FBox CalcBounds(const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3)
Definition BezierUtilities.cpp:26
@ false
Definition radaudio_common.h:23
Definition EngineBaseTypes.h:571
Definition UnrealType.h:6865
Definition ObjectPtr.h:488
Definition BoxSphereBounds.h:25