UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SpotLightComponent.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"
8#include "SpotLightComponent.generated.h"
9
11
15UCLASS(Blueprintable, ClassGroup=Lights, hidecategories=Object, editinlinenew, meta=(BlueprintSpawnableComponent), MinimalAPI)
16class USpotLightComponent : public UPointLightComponent
17{
19
20
21 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Light, meta=(UIMin = "1.0", UIMax = "80.0", ShouldShowInViewport = true))
22 float InnerConeAngle;
23
25 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Light, meta=(UIMin = "1.0", UIMax = "80.0", ShouldShowInViewport = true))
26 float OuterConeAngle;
27
28 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting")
29 ENGINE_API void SetInnerConeAngle(float NewInnerConeAngle);
30
31 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting")
32 ENGINE_API void SetOuterConeAngle(float NewOuterConeAngle);
33
34 // ULightComponent interface.
35 ENGINE_API virtual FSphere GetBoundingSphere() const override;
36 ENGINE_API virtual bool AffectsBounds(const FBoxSphereBounds& InBounds) const override;
37 ENGINE_API virtual ELightComponentType GetLightType() const override;
38 ENGINE_API virtual FLightSceneProxy* CreateSceneProxy() const override;
39
40 ENGINE_API virtual float ComputeLightBrightness() const override;
41#if WITH_EDITOR
42 ENGINE_API virtual void SetLightBrightness(float InBrightness) override;
43 ENGINE_API virtual FBox GetStreamingBounds() const override;
44#endif
45
46 ENGINE_API float GetHalfConeAngle() const;
47 ENGINE_API float GetCosHalfConeAngle() const;
48
49#if WITH_EDITOR
50 ENGINE_API virtual void PostEditChangeProperty( struct FPropertyChangedEvent& PropertyChangedEvent) override;
51#endif
52};
53
54
55
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 UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
ELightComponentType
Definition SceneTypes.h:96
Definition LightSceneProxy.h:43
virtual ENGINE_API FSphere GetBoundingSphere() const
Definition LightSceneProxy.cpp:190
uint8 GetLightType() const
Definition LightSceneProxy.h:235
virtual bool AffectsBounds(const FBoxSphereBounds &Bounds) const
Definition LightSceneProxy.h:55
Definition SpotLightComponent.h:17
Definition UnrealType.h:6865
Definition BoxSphereBounds.h:25