UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
EQSRenderingComponent.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "EngineDefines.h"
11#include "EQSRenderingComponent.generated.h"
12
15class UCanvas;
16
18{
20public:
21 AIMODULE_API virtual SIZE_T GetTypeHash() const override;
22
23 AIMODULE_API explicit FEQSSceneProxy(const UPrimitiveComponent& InComponent, const FString& ViewFlagName = TEXT("DebugAI"), const TArray<FSphere>& Spheres = TArray<FSphere>(), const TArray<FText3d>& Texts = TArray<FText3d>());
24
25 AIMODULE_API virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) const override;
26
27#if USE_EQS_DEBUGGER
28 static AIMODULE_API void CollectEQSData(const UPrimitiveComponent* InComponent, const IEQSQueryResultSourceInterface* QueryDataSource, TArray<FSphere>& Spheres, TArray<FText3d>& Texts, TArray<EQSDebug::FDebugHelper>& DebugItems);
30#endif
31private:
32 FEnvQueryResult QueryResult;
33 // can be 0
34 AActor* ActorOwner;
35 const IEQSQueryResultSourceInterface* QueryDataSource;
36 uint32 bDrawOnlyWhenSelected : 1;
37
38 static AIMODULE_API const FVector3f ItemDrawRadius;
39
40 AIMODULE_API bool SafeIsActorSelected() const;
41};
42
43#if USE_EQS_DEBUGGER
44class FEQSRenderingDebugDrawDelegateHelper : public FDebugDrawDelegateHelper
45{
46 typedef FDebugDrawDelegateHelper Super;
47
48public:
49 FEQSRenderingDebugDrawDelegateHelper()
50 : ActorOwner(nullptr)
51 , QueryDataSource(nullptr)
52 , bDrawOnlyWhenSelected(false)
53 {
54 }
55
57 {
58 ActorOwner = InSceneProxy->ActorOwner;
59 QueryDataSource = InSceneProxy->QueryDataSource;
60 bDrawOnlyWhenSelected = InSceneProxy->bDrawOnlyWhenSelected;
61 }
62
63 void Reset()
64 {
65 ResetTexts();
66 }
67
68protected:
69 AIMODULE_API virtual void DrawDebugLabels(UCanvas* Canvas, APlayerController*) override;
70
71private:
72 // can be 0
73 AActor* ActorOwner;
74 const IEQSQueryResultSourceInterface* QueryDataSource;
75 uint32 bDrawOnlyWhenSelected : 1;
76};
77#endif
78
79UCLASS(ClassGroup = Debug, MinimalAPI)
81{
83
84 FString DrawFlagName;
85 uint32 bDrawOnlyWhenSelected : 1;
86
87 AIMODULE_API void ClearStoredDebugData();
88#if USE_EQS_DEBUGGER || ENABLE_VISUAL_LOG
89 AIMODULE_API void StoreDebugData(const EQSDebug::FQueryData& DebugData);
90#endif
91
92protected:
93 AIMODULE_API virtual FBoxSphereBounds CalcBounds(const FTransform &LocalToWorld) const override;
94
95#if UE_ENABLE_DEBUG_DRAWING && USE_EQS_DEBUGGER
96 AIMODULE_API virtual FDebugRenderSceneProxy* CreateDebugSceneProxy() override;
97 virtual FDebugDrawDelegateHelper& GetDebugDrawDelegateHelper() override { return EQSRenderingDebugDrawDelegateHelper; }
98 FEQSRenderingDebugDrawDelegateHelper EQSRenderingDebugDrawDelegateHelper;
99#endif
100
101 //EQSDebug::FQueryData DebugData;
104};
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#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 Actor.h:257
Definition PlayerController.h:261
Definition DebugRenderSceneProxy.h:41
TArray< FSphere > Spheres
Definition DebugRenderSceneProxy.h:410
TArray< FText3d > Texts
Definition DebugRenderSceneProxy.h:411
FString ViewFlagName
Definition DebugRenderSceneProxy.h:419
Definition EQSRenderingComponent.h:18
friend class FEQSRenderingDebugDrawDelegateHelper
Definition EQSRenderingComponent.h:19
virtual AIMODULE_API FPrimitiveViewRelevance GetViewRelevance(const FSceneView *View) const override
Definition EQSRenderingComponent.cpp:260
virtual AIMODULE_API SIZE_T GetTypeHash() const override
Definition EQSRenderingComponent.cpp:32
Definition SceneView.h:1425
Definition EQSQueryResultSourceInterface.h:17
Definition Array.h:670
Definition Canvas.h:159
Definition DebugDrawComponent.h:50
Definition EQSRenderingComponent.h:81
TArray< FDebugRenderSceneProxy::FSphere > DebugDataSolidSpheres
Definition EQSRenderingComponent.h:102
TArray< FDebugRenderSceneProxy::FText3d > DebugDataTexts
Definition EQSRenderingComponent.h:103
@ false
Definition radaudio_common.h:23
Definition DebugRenderSceneProxy.h:434
void ResetTexts()
Definition DebugRenderSceneProxy.h:476
virtual ENGINE_API void DrawDebugLabels(UCanvas *Canvas, APlayerController *PlayerController)
Definition DebugRenderSceneProxy.cpp:174
Definition EnvQueryTypes.h:793
Definition EnvQueryTypes.h:520
Definition PrimitiveViewRelevance.h:14
Definition BoxSphereBounds.h:25