UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PrimitiveDrawInterface.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Math/MathFwd.h"
6
8class FSceneView;
9class FTexture;
10class HHitProxy;
11struct FMeshBatch;
12
14
19{
20public:
21
23
28
30 {
31 }
32
33 virtual bool IsHitTesting() = 0;
34 virtual void SetHitProxy(HHitProxy* HitProxy) = 0;
35
37
38 virtual void AddReserveLines(uint8 DepthPriorityGroup, int32 NumLines, bool bDepthBiased = false, bool bThickLines = false) = 0;
39
40 virtual void DrawSprite(
41 const FVector& Position,
42 float SizeX,
43 float SizeY,
44 const FTexture* Sprite,
45 const FLinearColor& Color,
46 uint8 DepthPriorityGroup,
47 float U,
48 float UL,
49 float V,
50 float VL,
51 uint8 BlendMode = 1, /*SE_BLEND_Masked*/
52 float OpacityMaskRefVal = .5f
53 ) = 0;
54
55 // Draw an opaque line. The alpha component of Color is ignored.
56 virtual void DrawLine(
57 const FVector& Start,
58 const FVector& End,
59 const FLinearColor& Color,
60 uint8 DepthPriorityGroup,
61 float Thickness = 0.0f,
62 float DepthBias = 0.0f,
63 bool bScreenSpace = false
64 ) = 0;
65
66 // Draw a translucent line. The alpha component of Color determines the transparency.
67 virtual void DrawTranslucentLine(
68 const FVector& Start,
69 const FVector& End,
70 const FLinearColor& Color,
71 uint8 DepthPriorityGroup,
72 float Thickness = 0.0f,
73 float DepthBias = 0.0f,
74 bool bScreenSpace = false
75 ) = 0;
76
77 virtual void DrawPoint(
78 const FVector& Position,
79 const FLinearColor& Color,
80 float PointSize,
81 uint8 DepthPriorityGroup
82 ) = 0;
83
90 virtual int32 DrawMesh(const FMeshBatch& Mesh) = 0;
91};
92
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
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition SceneManagement.h:1267
Definition PrimitiveDrawInterface.h:19
virtual void DrawPoint(const FVector &Position, const FLinearColor &Color, float PointSize, uint8 DepthPriorityGroup)=0
virtual void RegisterDynamicResource(FDynamicPrimitiveResource *DynamicResource)=0
virtual void AddReserveLines(uint8 DepthPriorityGroup, int32 NumLines, bool bDepthBiased=false, bool bThickLines=false)=0
virtual void DrawTranslucentLine(const FVector &Start, const FVector &End, const FLinearColor &Color, uint8 DepthPriorityGroup, float Thickness=0.0f, float DepthBias=0.0f, bool bScreenSpace=false)=0
virtual void SetHitProxy(HHitProxy *HitProxy)=0
const FSceneView * View
Definition PrimitiveDrawInterface.h:22
virtual int32 DrawMesh(const FMeshBatch &Mesh)=0
virtual ~FPrimitiveDrawInterface()
Definition PrimitiveDrawInterface.h:29
virtual bool IsHitTesting()=0
FPrimitiveDrawInterface(const FSceneView *InView)
Definition PrimitiveDrawInterface.h:25
virtual void DrawLine(const FVector &Start, const FVector &End, const FLinearColor &Color, uint8 DepthPriorityGroup, float Thickness=0.0f, float DepthBias=0.0f, bool bScreenSpace=false)=0
virtual void DrawSprite(const FVector &Position, float SizeX, float SizeY, const FTexture *Sprite, const FLinearColor &Color, uint8 DepthPriorityGroup, float U, float UL, float V, float VL, uint8 BlendMode=1, float OpacityMaskRefVal=.5f)=0
Definition SceneView.h:1425
Definition RenderResource.h:354
Definition HitProxies.h:135
Definition Color.h:48
Definition MeshBatch.h:371