UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ModelLight.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 ModelLight.h: Unreal model lighting.
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
10#include "StaticLighting.h"
11#include "Model.h"
12
14class ULevel;
15class ULightComponent;
16class UModelComponent;
18
21{
22public:
23
26
29
31
34
37
41 UModel* Model,
43 );
44
45 // FStaticLightingMesh interface.
47 virtual void GetTriangleIndices(int32 TriangleIndex,int32& OutI0,int32& OutI1,int32& OutI2) const override;
48 virtual FLightRayIntersection IntersectLightRay(const FVector& Start,const FVector& End,bool bFindNearestIntersection) const override;
49 //FStaticLightingTextureMapping interface.
50
51 virtual bool IsInstancedMesh() const override { return false; }
52
53 virtual bool IsValidMapping() const override
54 {
55 return Model.IsValid() && !Model->bInvalidForStaticLighting;
56 }
57
58#if WITH_EDITOR
60 virtual bool DebugThisMapping() const override;
61
66 UNREALED_API virtual void ExportMapping(class FLightmassExporter* Exporter) override;
67#endif //WITH_EDITOR
68
73 virtual const FGuid& GetLightingGuid() const override
74 {
75 return Guid;
76 }
77
78 virtual FString GetDescription() const override
79 {
80 return FString(TEXT("BSPMapping"));
81 }
82
83 const UModel* GetModel() const
84 {
85 return Model.Get();
86 }
87
88#if WITH_EDITOR
92 UNREALED_API virtual UObject* GetMappedObject() const override;
93#endif //WITH_EDITOR
94
95private:
96
99};
#define TEXT(x)
Definition Platform.h:1272
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
Definition ModelLight.h:21
TMap< ULightComponent *, FShadowMapData2D * > ShadowMapData
Definition ModelLight.h:30
virtual bool IsValidMapping() const override
Definition ModelLight.h:53
virtual const FGuid & GetLightingGuid() const override
Definition ModelLight.h:73
virtual bool IsInstancedMesh() const override
Definition ModelLight.h:51
virtual FLightRayIntersection IntersectLightRay(const FVector &Start, const FVector &End, bool bFindNearestIntersection) const override
Definition ModelLight.cpp:132
virtual FString GetDescription() const override
Definition ModelLight.h:78
virtual void GetTriangleIndices(int32 TriangleIndex, int32 &OutI0, int32 &OutI1, int32 &OutI2) const override
Definition ModelLight.cpp:125
FIntRect MappedRect
Definition ModelLight.h:36
virtual void GetTriangle(int32 TriangleIndex, FStaticLightingVertex &OutV0, FStaticLightingVertex &OutV1, FStaticLightingVertex &OutV2) const override
Definition ModelLight.cpp:118
const FNodeGroup * NodeGroup
Definition ModelLight.h:25
bool bComplete
Definition ModelLight.h:28
const UModel * GetModel() const
Definition ModelLight.h:83
FQuantizedLightmapData * QuantizedData
Definition ModelLight.h:33
Definition StaticLighting.h:93
Definition ShadowMap.h:100
Definition StaticLighting.h:114
FGuid Guid
Definition StaticLighting.h:157
const UPrimitiveComponent *const Component
Definition StaticLighting.h:148
Definition StaticLighting.h:406
virtual void Apply(struct FQuantizedLightmapData *QuantizedData, const TMap< ULightComponent *, class FShadowMapData2D * > &ShadowMapData, const FStaticLightingBuildContext *LightingContext)=0
Definition UnrealString.h.inl:34
Definition Level.h:423
Definition ModelComponent.h:34
Definition Model.h:401
bool bInvalidForStaticLighting
Definition Model.h:443
Definition Object.h:95
Definition Guid.h:109
Definition Model.h:362
Definition LightMap.h:500
Definition StaticLighting.h:23
Definition WeakObjectPtrTemplates.h:25
FORCEINLINE T * Get(bool bEvenIfPendingKill) const
Definition WeakObjectPtrTemplates.h:132
FORCEINLINE bool IsValid(bool bEvenIfPendingKill, bool bThreadsafeTest=false) const
Definition WeakObjectPtrTemplates.h:232