UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PrimitiveDrawingUtils.cpp File Reference

Functions

void DrawPlane10x10 (class FPrimitiveDrawInterface *PDI, const FMatrix &ObjectToWorld, float Radii, FVector2D UVMin, FVector2D UVMax, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriorityGroup)
 
void DrawTriangle (class FPrimitiveDrawInterface *PDI, const FVector &A, const FVector &B, const FVector &C, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriorityGroup)
 
void GetBoxMesh (const FMatrix &BoxToWorld, const FVector &Radii, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriorityGroup, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void DrawBox (FPrimitiveDrawInterface *PDI, const FMatrix &BoxToWorld, const FVector &Radii, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriorityGroup)
 
void GetOrientedHalfSphereMesh (const FVector &Center, const FRotator &Orientation, const FVector &Radii, int32 NumSides, int32 NumRings, float StartAngle, float EndAngle, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector &Collector, bool bUseSelectionOutline, HHitProxy *HitProxy)
 
void GetHalfSphereMesh (const FVector &Center, const FVector &Radii, int32 NumSides, int32 NumRings, float StartAngle, float EndAngle, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector &Collector, bool bUseSelectionOutline, HHitProxy *HitProxy)
 
void GetSphereMesh (const FVector &Center, const FVector &Radii, int32 NumSides, int32 NumRings, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector &Collector)
 
ENGINE_API void GetSphereMesh (const FVector &Center, const FVector &Radii, int32 NumSides, int32 NumRings, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector &Collector, bool bUseSelectionOutline, HHitProxy *HitProxy)
 
void DrawSphere (FPrimitiveDrawInterface *PDI, const FVector &Center, const FRotator &Orientation, const FVector &Radii, int32 NumSides, int32 NumRings, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling)
 
FVector CalcConeVert (float Angle1, float Angle2, float AzimuthAngle)
 
void BuildConeVerts (float Angle1, float Angle2, float Scale, float XOffset, uint32 NumSides, TArray< FDynamicMeshVertex > &OutVerts, TArray< uint32 > &OutIndices)
 
void DrawCone (FPrimitiveDrawInterface *PDI, const FMatrix &ConeToWorld, float Angle1, float Angle2, uint32 NumSides, bool bDrawSideLines, const FLinearColor &SideLineColor, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority)
 
void BuildDiscVerts (const FVector &Center, const FVector &XAxis, const FVector &YAxis, double Radius, uint32 Sides, TArray< FDynamicMeshVertex > &OutVerts, TArray< uint32 > &OutIndices)
 
void GetDiscMesh (const FVector &Center, const FVector &XAxis, const FVector &YAxis, double Radius, int32 Sides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void GetDiscMesh (const FMatrix &ToWorld, const FVector &Center, const FVector &XAxis, const FVector &YAxis, double Radius, int32 Sides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void BuildCylinderVerts (const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double Radius, double HalfHeight, uint32 Sides, TArray< FDynamicMeshVertex > &OutVerts, TArray< uint32 > &OutIndices)
 
void BuildTaperedCylinderVerts (const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double BaseRadius, double TopRadius, double HalfHeight, uint32 Sides, TArray< FDynamicMeshVertex > &OutVerts, TArray< uint32 > &OutIndices)
 
void GetCylinderMesh (const FVector &Start, const FVector &End, double Radius, int32 Sides, const FMaterialRenderProxy *MaterialInstance, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void GetCylinderMesh (const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double Radius, double HalfHeight, int32 Sides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void GetCylinderMesh (const FMatrix &CylToWorld, const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double Radius, double HalfHeight, uint32 Sides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void GetConeMesh (const FMatrix &LocalToWorld, float AngleWidth, float AngleHeight, uint32 NumSides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void GetCapsuleMesh (const FVector &Origin, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, const FLinearColor &Color, double Radius, double HalfHeight, int32 NumSides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector &Collector, HHitProxy *HitProxy)
 
void DrawCylinder (FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double Radius, double HalfHeight, uint32 Sides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority)
 
void DrawCylinder (FPrimitiveDrawInterface *PDI, const FMatrix &CylToWorld, const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double Radius, double HalfHeight, uint32 Sides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority)
 
void DrawCylinder (class FPrimitiveDrawInterface *PDI, const FVector &Start, const FVector &End, double Radius, int32 Sides, const FMaterialRenderProxy *MaterialInstance, uint8 DepthPriority)
 
void DrawTorus (FPrimitiveDrawInterface *PDI, const FMatrix &Transform, const FVector &XAxis, const FVector &YAxis, double OuterRadius, double InnerRadius, int32 OuterSegments, int32 InnerSegments, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bPartial, float Angle, bool bEndCaps)
 
void DrawTorus (FPrimitiveDrawInterface *PDI, const FMatrix &Transform, const FVector &XAxis, const FVector &YAxis, FColor Color, double OuterRadius, double InnerRadius, int32 OuterSegments, int32 InnerSegments, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, bool bPartial, float Angle, bool bEndCaps)
 
void DrawDisc (class FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &XAxis, const FVector &YAxis, FColor Color, double Radius, int32 NumSides, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority)
 
void DrawFlatArrow (class FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &XAxis, const FVector &YAxis, FColor Color, float Length, int32 Width, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority, float Thickness)
 
void DrawWireBox (FPrimitiveDrawInterface *PDI, const FBox &Box, const FLinearColor &Color, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireBox (FPrimitiveDrawInterface *PDI, const FMatrix &Matrix, const FBox &Box, const FLinearColor &Color, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawCircle (FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &X, const FVector &Y, const FLinearColor &Color, double Radius, int32 NumSides, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawArc (FPrimitiveDrawInterface *PDI, const FVector Base, const FVector X, const FVector Y, const float MinAngle, const float MaxAngle, const double Radius, const int32 Sections, const FLinearColor &Color, uint8 DepthPriority)
 
void DrawRectangleMesh (FPrimitiveDrawInterface *PDI, const FVector &Center, const FVector &XAxis, const FVector &YAxis, FColor Color, float Width, float Height, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriority)
 
void DrawRectangle (class FPrimitiveDrawInterface *PDI, const FVector &Center, const FVector &XAxis, const FVector &YAxis, FColor Color, float Width, float Height, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireSphere (class FPrimitiveDrawInterface *PDI, const FVector &Base, const FLinearColor &Color, double Radius, int32 NumSides, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireSphereAutoSides (class FPrimitiveDrawInterface *PDI, const FVector &Base, const FLinearColor &Color, double Radius, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireSphere (class FPrimitiveDrawInterface *PDI, const FTransform &Transform, const FLinearColor &Color, double Radius, int32 NumSides, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireSphereAutoSides (class FPrimitiveDrawInterface *PDI, const FTransform &Transform, const FLinearColor &Color, double Radius, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireCylinder (FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &X, const FVector &Y, const FVector &Z, const FLinearColor &Color, double Radius, double HalfHeight, int32 NumSides, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireCapsule (FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &X, const FVector &Y, const FVector &Z, const FLinearColor &Color, double Radius, double HalfHeight, int32 NumSides, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireCone (FPrimitiveDrawInterface *PDI, TArray< FVector > &Verts, const FTransform &Transform, double ConeLength, double ConeAngle, int32 ConeSides, const FLinearColor &Color, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireCone (FPrimitiveDrawInterface *PDI, TArray< FVector > &Verts, const FMatrix &Transform, double ConeLength, double ConeAngle, int32 ConeSides, const FLinearColor &Color, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawWireSphereCappedCone (FPrimitiveDrawInterface *PDI, const FTransform &Transform, double ConeLength, double ConeAngle, int32 ConeSides, int32 ArcFrequency, int32 CapSegments, const FLinearColor &Color, uint8 DepthPriority)
 
void DrawWireChoppedCone (FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &X, const FVector &Y, const FVector &Z, const FLinearColor &Color, double Radius, double TopRadius, double HalfHeight, int32 NumSides, uint8 DepthPriority)
 
void DrawOrientedWireBox (FPrimitiveDrawInterface *PDI, const FVector &Base, const FVector &X, const FVector &Y, const FVector &Z, FVector Extent, const FLinearColor &Color, uint8 DepthPriority, float Thickness, float DepthBias, bool bScreenSpace)
 
void DrawCoordinateSystem (FPrimitiveDrawInterface *PDI, FVector const &AxisLoc, FRotator const &AxisRot, float Scale, uint8 DepthPriority, float Thickness)
 
void DrawCoordinateSystem (FPrimitiveDrawInterface *PDI, FVector const &AxisLoc, FRotator const &AxisRot, float Scale, const FLinearColor &InColor, uint8 DepthPriority, float Thickness)
 
void DrawDirectionalArrow (FPrimitiveDrawInterface *PDI, const FMatrix &ArrowToWorld, const FLinearColor &InColor, float Length, float ArrowSize, uint8 DepthPriority, float Thickness)
 
void DrawConnectedArrow (class FPrimitiveDrawInterface *PDI, const FMatrix &ArrowToWorld, const FLinearColor &Color, float ArrowHeight, float ArrowWidth, uint8 DepthPriority, float Thickness, int32 NumSpokes)
 
void DrawWireStar (FPrimitiveDrawInterface *PDI, const FVector &Position, float Size, const FLinearColor &Color, uint8 DepthPriority)
 
void DrawDashedLine (FPrimitiveDrawInterface *PDI, const FVector &Start, const FVector &End, const FLinearColor &Color, double DashSize, uint8 DepthPriority, float DepthBias)
 
void DrawWireDiamond (FPrimitiveDrawInterface *PDI, const FMatrix &DiamondMatrix, float Size, const FLinearColor &InColor, uint8 DepthPriority, float Thickness)
 
FLinearColor GetSelectionColor (const FLinearColor &BaseColor, bool bSelected, bool bHovered, bool bUseOverlayIntensity)
 
FLinearColor GetViewSelectionColor (const FLinearColor &BaseColor, const FSceneView &View, bool bSelected, bool bHovered, bool bUseOverlayIntensity, bool bIndividuallySelected)
 
bool IsRichView (const FSceneViewFamily &ViewFamily)
 
void ApplyViewModeOverrides (int32 ViewIndex, const FEngineShowFlags &EngineShowFlags, ERHIFeatureLevel::Type FeatureLevel, const FPrimitiveSceneProxy *PrimitiveSceneProxy, bool bSelected, FMeshBatch &Mesh, FMeshElementCollector &Collector)
 
bool IsUVOutOfBounds (FVector2D UV)
 
template<class VertexBufferType , class IndexBufferType >
void DrawUVsInternal (FViewport *InViewport, FCanvas *InCanvas, int32 InTextYPos, const int32 LODLevel, int32 UVChannel, TArray< FVector2D > SelectedEdgeTexCoords, VertexBufferType &VertexBuffer, IndexBufferType &Indices)
 
void DrawUVs (FViewport *InViewport, FCanvas *InCanvas, int32 InTextYPos, const int32 LODLevel, int32 UVChannel, TArray< FVector2D > SelectedEdgeTexCoords, FStaticMeshRenderData *StaticMeshRenderData, FSkeletalMeshLODRenderData *SkeletalMeshRenderData)
 

Function Documentation

◆ ApplyViewModeOverrides()

void ApplyViewModeOverrides ( int32  ViewIndex,
const FEngineShowFlags EngineShowFlags,
ERHIFeatureLevel::Type  FeatureLevel,
const FPrimitiveSceneProxy PrimitiveSceneProxy,
bool  bSelected,
FMeshBatch Mesh,
FMeshElementCollector Collector 
)

◆ BuildConeVerts()

void BuildConeVerts ( float  Angle1,
float  Angle2,
float  Scale,
float  XOffset,
uint32  NumSides,
TArray< FDynamicMeshVertex > &  OutVerts,
TArray< uint32 > &  OutIndices 
)

◆ BuildCylinderVerts()

void BuildCylinderVerts ( const FVector Base,
const FVector XAxis,
const FVector YAxis,
const FVector ZAxis,
double  Radius,
double  HalfHeight,
uint32  Sides,
TArray< FDynamicMeshVertex > &  OutVerts,
TArray< uint32 > &  OutIndices 
)

◆ BuildDiscVerts()

void BuildDiscVerts ( const FVector Center,
const FVector XAxis,
const FVector YAxis,
double  Radius,
uint32  Sides,
TArray< FDynamicMeshVertex > &  OutVerts,
TArray< uint32 > &  OutIndices 
)

◆ BuildTaperedCylinderVerts()

void BuildTaperedCylinderVerts ( const FVector Base,
const FVector XAxis,
const FVector YAxis,
const FVector ZAxis,
double  BaseRadius,
double  TopRadius,
double  HalfHeight,
uint32  Sides,
TArray< FDynamicMeshVertex > &  OutVerts,
TArray< uint32 > &  OutIndices 
)

Build tapered cylinder vertices with a separate base and top radius.

◆ CalcConeVert()

FVector CalcConeVert ( float  Angle1,
float  Angle2,
float  AzimuthAngle 
)

◆ DrawArc()

void DrawArc ( FPrimitiveDrawInterface PDI,
const FVector  Base,
const FVector  X,
const FVector  Y,
const float  MinAngle,
const float  MaxAngle,
const double  Radius,
const int32  Sections,
const FLinearColor Color,
uint8  DepthPriority 
)

Draws an arc using lines.

Parameters
PDIDraw interface.
BaseCenter of the circle.
XNormalized axis from one point to the center
YNormalized axis from other point to the center
MinAngleThe minimum angle
MaxAngleThe maximum angle
RadiusRadius of the arc
SectionsNumbers of sides that the circle has.
ColorColor of the circle.
DepthPriorityDepth priority for the circle.

◆ DrawBox()

void DrawBox ( FPrimitiveDrawInterface PDI,
const FMatrix BoxToWorld,
const FVector Radii,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriorityGroup 
)

◆ DrawCircle()

void DrawCircle ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector X,
const FVector Y,
const FLinearColor Color,
double  Radius,
int32  NumSides,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a wireframe circle.

Parameters
PDIDraw interface.
CenterCenter of the circle.
XX alignment axis to draw along.
YY alignment axis to draw along.
ColorColor of the cylinder.
RadiusRadius of the cylinder.
NumSidesNumbers of sides that the cylinder has.
DepthPriorityDepth priority for the cylinder.
ThicknessThickness of the lines comprising the circle

◆ DrawCone()

void DrawCone ( FPrimitiveDrawInterface PDI,
const FMatrix ConeToWorld,
float  Angle1,
float  Angle2,
uint32  NumSides,
bool  bDrawSideLines,
const FLinearColor SideLineColor,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority 
)

◆ DrawConnectedArrow()

void DrawConnectedArrow ( class FPrimitiveDrawInterface PDI,
const FMatrix ArrowToWorld,
const FLinearColor Color,
float  ArrowHeight,
float  ArrowWidth,
uint8  DepthPriority,
float  Thickness = 0.5f,
int32  NumSpokes = 6 
)

Draws a directional arrow with connected spokes.

Parameters
PDIDraw interface.
ArrowToWorldTransform matrix for the arrow.
ColorColor of the arrow.
ArrowHeightHeight of the the arrow head.
ArrowWidthWidth of the arrow head.
DepthPriorityDepth priority for the arrow.
ThicknessThickness of the lines used to draw the arrow.
NumSpokesNumber of spokes used to make the arrow head.

◆ DrawCoordinateSystem() [1/2]

void DrawCoordinateSystem ( FPrimitiveDrawInterface PDI,
FVector const &  AxisLoc,
FRotator const &  AxisRot,
float  Scale,
const FLinearColor InColor,
uint8  DepthPriority,
float  Thickness = 0.0f 
)

Draws a coordinate system with a fixed color.

Parameters
PDIDraw interface.
AxisLocLocation of the coordinate system.
AxisRotLocation of the coordinate system.
ScaleScale for the axis lines.
InColorColor of the axis lines.
DepthPriorityDepth priority coordinate system.
ThicknessHow thick to draw the axis lines

◆ DrawCoordinateSystem() [2/2]

void DrawCoordinateSystem ( FPrimitiveDrawInterface PDI,
FVector const &  AxisLoc,
FRotator const &  AxisRot,
float  Scale,
uint8  DepthPriority,
float  Thickness = 0.0f 
)

Draws a coordinate system (Red for X axis, Green for Y axis, Blue for Z axis).

Parameters
PDIDraw interface.
AxisLocLocation of the coordinate system.
AxisRotLocation of the coordinate system.
ScaleScale for the axis lines.
DepthPriorityDepth priority coordinate system.
ThicknessHow thick to draw the axis lines

◆ DrawCylinder() [1/3]

void DrawCylinder ( class FPrimitiveDrawInterface PDI,
const FVector Start,
const FVector End,
double  Radius,
int32  Sides,
const FMaterialRenderProxy MaterialInstance,
uint8  DepthPriority 
)

◆ DrawCylinder() [2/3]

void DrawCylinder ( FPrimitiveDrawInterface PDI,
const FMatrix CylToWorld,
const FVector Base,
const FVector XAxis,
const FVector YAxis,
const FVector ZAxis,
double  Radius,
double  HalfHeight,
uint32  Sides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority 
)

◆ DrawCylinder() [3/3]

void DrawCylinder ( FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector XAxis,
const FVector YAxis,
const FVector ZAxis,
double  Radius,
double  HalfHeight,
uint32  Sides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority 
)

◆ DrawDashedLine()

void DrawDashedLine ( class FPrimitiveDrawInterface PDI,
const FVector Start,
const FVector End,
const FLinearColor Color,
double  DashSize,
uint8  DepthPriority,
float  DepthBias = 0.0f 
)

Draws a dashed line.

Parameters
PDIDraw interface.
StartStart position of the line.
EndEnd position of the line.
ColorColor of the arrow.
DashSizeSize of each of the dashes that makes up the line.
DepthPriorityDepth priority for the line.

◆ DrawDirectionalArrow()

void DrawDirectionalArrow ( class FPrimitiveDrawInterface PDI,
const FMatrix ArrowToWorld,
const FLinearColor InColor,
float  Length,
float  ArrowSize,
uint8  DepthPriority,
float  Thickness = 0.0f 
)

Draws a directional arrow (starting at ArrowToWorld.Origin and continuing for Length units in the X direction of ArrowToWorld).

Parameters
PDIDraw interface.
ArrowToWorldTransform matrix for the arrow.
InColorColor of the arrow.
LengthLength of the arrow
ArrowSizeSize of the arrow head.
DepthPriorityDepth priority for the arrow.
ThicknessThickness of the lines comprising the arrow

◆ DrawDisc()

void DrawDisc ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector XAxis,
const FVector YAxis,
FColor  Color,
double  Radius,
int32  NumSides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority 
)

Draws a circle using triangles.

Parameters
PDIDraw interface.
BaseCenter of the circle.
XAxisX alignment axis to draw along.
YAxisY alignment axis to draw along.
ColorColor of the circle.
RadiusRadius of the circle.
NumSidesNumbers of sides that the circle has.
MaterialRenderProxyMaterial to use for render
DepthPriorityDepth priority for the circle.

◆ DrawFlatArrow()

void DrawFlatArrow ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector XAxis,
const FVector YAxis,
FColor  Color,
float  Length,
int32  Width,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
float  Thickness = 0.0f 
)

Draws a flat arrow with an outline.

Parameters
PDIDraw interface.
BaseBase of the arrow.
XAxisX alignment axis to draw along.
YAxisY alignment axis to draw along.
ColorColor of the circle.
LengthLength of the arrow, from base to tip.
WidthWidth of the base of the arrow, head of the arrow will be 2x.
MaterialRenderProxyMaterial to use for render
DepthPriorityDepth priority for the circle.
ThicknessThickness of the lines comprising the arrow

◆ DrawOrientedWireBox()

void DrawOrientedWireBox ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector X,
const FVector Y,
const FVector Z,
FVector  Extent,
const FLinearColor Color,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws an oriented box.

Parameters
PDIDraw interface.
BaseCenter point of the box.
XX alignment axis to draw along.
YY alignment axis to draw along.
ZZ alignment axis to draw along.
ColorColor of the box.
ExtentVector with the half-sizes of the box.
DepthPriorityDepth priority for the cone.
ThicknessThickness of the lines comprising the box

◆ DrawPlane10x10()

void DrawPlane10x10 ( class FPrimitiveDrawInterface PDI,
const FMatrix ObjectToWorld,
float  Radii,
FVector2D  UVMin,
FVector2D  UVMax,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriorityGroup 
)

◆ DrawRectangle()

void DrawRectangle ( FPrimitiveDrawInterface PDI,
const FVector Center,
const FVector XAxis,
const FVector YAxis,
FColor  Color,
float  Width,
float  Height,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a rectangle using lines.

Parameters
PDIDraw interface.
CenterCenter of the rectangle.
XAxisNormalized X alignment axis.
YAxisNormalized Y alignment axis.
ColorColor of the circle.
WidthWidth of rectangle along the X dimension.
HeightHeight of rectangle along the Y dimension.
MaterialRenderProxyMaterial to use for render
DepthPriorityDepth priority for the rectangle.
ThicknessThickness of the lines comprising the rectangle.

◆ DrawRectangleMesh()

void DrawRectangleMesh ( FPrimitiveDrawInterface PDI,
const FVector Center,
const FVector XAxis,
const FVector YAxis,
FColor  Color,
float  Width,
float  Height,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority 
)

Draws a rectangle using triangles.

Parameters
PDIDraw interface.
CenterCenter of the rectangle.
XAxisNormalized X alignment axis.
YAxisNormalized Y alignment axis.
ColorColor of the circle.
WidthWidth of rectangle along the X dimension.
HeightHeight of rectangle along the Y dimension.
MaterialRenderProxyMaterial to use for render
DepthPriorityDepth priority for the rectangle.

◆ DrawSphere()

void DrawSphere ( FPrimitiveDrawInterface PDI,
const FVector Center,
const FRotator Orientation,
const FVector Radii,
int32  NumSides,
int32  NumRings,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bDisableBackfaceCulling 
)

◆ DrawTorus() [1/2]

void DrawTorus ( FPrimitiveDrawInterface PDI,
const FMatrix Transform,
const FVector XAxis,
const FVector YAxis,
double  OuterRadius,
double  InnerRadius,
int32  OuterSegments,
int32  InnerSegments,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bPartial,
float  Angle,
bool  bEndCaps 
)

Draws a torus using triangles.

Parameters
PDIDraw interface.
TransformGeneric transform to apply (ex. a local-to-world transform).
XAxisNormalized X alignment axis.
YAxisNormalized Y alignment axis.
OuterRadiusRadius of the torus center-line. Viewed from above, the outside of the torus has a radius of OuterRadius + InnerRadius and the hole of the torus has a radius of OuterRadius - InnerRadius.
InnerRadiusRadius of the torus's cylinder.
OuterSegmentsNumbers of segment divisions for outer circle.
InnerSegmentsNumbers of segment divisions for inner circle.
MaterialRenderProxyMaterial to use for render
DepthPriorityDepth priority for the circle.
bPartialWhether full or partial torus should be rendered.
AngleIf partial, angle in radians of the arc clockwise beginning at the XAxis.
bEndCapsIf partial, whether the ends should be capped with triangles.

◆ DrawTorus() [2/2]

void DrawTorus ( FPrimitiveDrawInterface PDI,
const FMatrix Transform,
const FVector XAxis,
const FVector YAxis,
FColor  Color,
double  OuterRadius,
double  InnerRadius,
int32  OuterSegments,
int32  InnerSegments,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bPartial,
float  Angle,
bool  bEndCaps 
)

Draws a torus using triangles.

Parameters
PDIDraw interface.
TransformGeneric transform to apply (ex. a local-to-world transform).
XAxisNormalized X alignment axis.
YAxisNormalized Y alignment axis.
ColorColor of the circle.
OuterRadiusRadius of the torus center-line. Viewed from above, the outside of the torus has a radius of OuterRadius + InnerRadius and the hole of the torus has a radius of OuterRadius - InnerRadius.
InnerRadiusRadius of the torus's cylinder.
OuterSegmentsNumbers of segment divisions for outer circle.
InnerSegmentsNumbers of segment divisions for inner circle.
MaterialRenderProxyMaterial to use for render
DepthPriorityDepth priority for the circle.
bPartialWhether full or partial torus should be rendered.
AngleIf partial, angle in radians of the arc clockwise beginning at the XAxis.
bEndCapsIf partial, whether the ends should be capped with triangles.

◆ DrawTriangle()

void DrawTriangle ( class FPrimitiveDrawInterface PDI,
const FVector A,
const FVector B,
const FVector C,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriorityGroup 
)

◆ DrawUVs()

void DrawUVs ( FViewport InViewport,
FCanvas InCanvas,
int32  InTextYPos,
const int32  LODLevel,
int32  UVChannel,
TArray< FVector2D SelectedEdgeTexCoords,
class FStaticMeshRenderData StaticMeshRenderData,
class FSkeletalMeshLODRenderData SkeletalMeshRenderData 
)

Draws the UV layout of the supplied asset (either StaticMeshRenderData OR SkeletalMeshRenderData, not both!)

◆ DrawUVsInternal()

template<class VertexBufferType , class IndexBufferType >
void DrawUVsInternal ( FViewport InViewport,
FCanvas InCanvas,
int32  InTextYPos,
const int32  LODLevel,
int32  UVChannel,
TArray< FVector2D SelectedEdgeTexCoords,
VertexBufferType VertexBuffer,
IndexBufferType Indices 
)

◆ DrawWireBox() [1/2]

void DrawWireBox ( class FPrimitiveDrawInterface PDI,
const FBox Box,
const FLinearColor Color,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a wireframe box.

Parameters
PDIDraw interface.
BoxThe FBox to use for drawing.
ColorColor of the box.
DepthPriorityDepth priority for the circle.
ThicknessThickness of the lines comprising the box

◆ DrawWireBox() [2/2]

void DrawWireBox ( FPrimitiveDrawInterface PDI,
const FMatrix Matrix,
const FBox Box,
const FLinearColor Color,
uint8  DepthPriority,
float  Thickness,
float  DepthBias,
bool  bScreenSpace 
)

◆ DrawWireCapsule()

void DrawWireCapsule ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector X,
const FVector Y,
const FVector Z,
const FLinearColor Color,
double  Radius,
double  HalfHeight,
int32  NumSides,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a wireframe capsule.

Parameters
PDIDraw interface.
BaseCenter pointer of the base of the cylinder.
XX alignment axis to draw along.
YY alignment axis to draw along.
ZZ alignment axis to draw along.
ColorColor of the cylinder.
RadiusRadius of the cylinder.
HalfHeightHalf of the height of the cylinder.
NumSidesNumbers of sides that the cylinder has.
DepthPriorityDepth priority for the cylinder.
ThicknessThickness of the lines comprising the cylinder

◆ DrawWireChoppedCone()

void DrawWireChoppedCone ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector X,
const FVector Y,
const FVector Z,
const FLinearColor Color,
double  Radius,
double  TopRadius,
double  HalfHeight,
int32  NumSides,
uint8  DepthPriority 
)

Draws a wireframe chopped cone (cylinder with independent top and bottom radius).

Parameters
PDIDraw interface.
BaseCenter pointer of the base of the cone.
XX alignment axis to draw along.
YY alignment axis to draw along.
ZZ alignment axis to draw along.
ColorColor of the cone.
RadiusRadius of the cone at the bottom.
TopRadiusRadius of the cone at the top.
HalfHeightHalf of the height of the cone.
NumSidesNumbers of sides that the cone has.
DepthPriorityDepth priority for the cone.

◆ DrawWireCone() [1/2]

void DrawWireCone ( class FPrimitiveDrawInterface PDI,
TArray< FVector > &  Verts,
const FMatrix Transform,
double  ConeLength,
double  ConeAngle,
int32  ConeSides,
const FLinearColor Color,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a wireframe cone

Parameters
PDIDraw interface.
TransformGeneric transform to apply (ex. a local-to-world transform).
ConeLengthPre-transform distance from apex to the perimeter of the cone base. The Radius of the base is ConeLength * sin(ConeAngle).
ConeAngleAngle of the cone in degrees. This is 1/2 the cone aperture.
ConeSidesNumbers of sides that the cone has.
ColorColor of the cone.
DepthPriorityDepth priority for the cone.
VertsOut param, the positions of the verts at the cone base.
ThicknessThickness of the lines comprising the cone

◆ DrawWireCone() [2/2]

void DrawWireCone ( FPrimitiveDrawInterface PDI,
TArray< FVector > &  Verts,
const FTransform Transform,
double  ConeLength,
double  ConeAngle,
int32  ConeSides,
const FLinearColor Color,
uint8  DepthPriority,
float  Thickness,
float  DepthBias,
bool  bScreenSpace 
)

◆ DrawWireCylinder()

void DrawWireCylinder ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FVector X,
const FVector Y,
const FVector Z,
const FLinearColor Color,
double  Radius,
double  HalfHeight,
int32  NumSides,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a wireframe cylinder.

Parameters
PDIDraw interface.
BaseCenter pointer of the base of the cylinder.
XX alignment axis to draw along.
YY alignment axis to draw along.
ZZ alignment axis to draw along.
ColorColor of the cylinder.
RadiusRadius of the cylinder.
HalfHeightHalf of the height of the cylinder.
NumSidesNumbers of sides that the cylinder has.
DepthPriorityDepth priority for the cylinder.
ThicknessThickness of the lines comprising the cylinder

◆ DrawWireDiamond()

void DrawWireDiamond ( class FPrimitiveDrawInterface PDI,
const FMatrix DiamondMatrix,
float  Size,
const FLinearColor InColor,
uint8  DepthPriority,
float  Thickness = 0.0f 
)

Draws a wireframe diamond.

Parameters
PDIDraw interface.
DiamondMatrixTransform Matrix for the diamond.
SizeSize of the diamond.
InColorColor of the diamond.
DepthPriorityDepth priority for the diamond.
ThicknessHow thick to draw diamond lines

◆ DrawWireSphere() [1/2]

void DrawWireSphere ( class FPrimitiveDrawInterface PDI,
const FTransform Transform,
const FLinearColor Color,
double  Radius,
int32  NumSides,
uint8  DepthPriority,
float  Thickness,
float  DepthBias,
bool  bScreenSpace 
)

◆ DrawWireSphere() [2/2]

void DrawWireSphere ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FLinearColor Color,
double  Radius,
int32  NumSides,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a sphere using circles.

Parameters
PDIDraw interface.
BaseCenter of the sphere.
ColorColor of the sphere.
RadiusRadius of the sphere.
NumSidesNumbers of sides that the circle has.
DepthPriorityDepth priority for the circle.
ThicknessThickness of the lines comprising the sphere

◆ DrawWireSphereAutoSides() [1/2]

void DrawWireSphereAutoSides ( class FPrimitiveDrawInterface PDI,
const FTransform Transform,
const FLinearColor Color,
double  Radius,
uint8  DepthPriority,
float  Thickness,
float  DepthBias,
bool  bScreenSpace 
)

◆ DrawWireSphereAutoSides() [2/2]

void DrawWireSphereAutoSides ( class FPrimitiveDrawInterface PDI,
const FVector Base,
const FLinearColor Color,
double  Radius,
uint8  DepthPriority,
float  Thickness = 0.0f,
float  DepthBias = 0.0f,
bool  bScreenSpace = false 
)

Draws a sphere using circles, automatically calculating a reasonable number of sides

Parameters
PDIDraw interface.
BaseCenter of the sphere.
ColorColor of the sphere.
RadiusRadius of the sphere.
DepthPriorityDepth priority for the circle.
ThicknessThickness of the lines comprising the sphere

◆ DrawWireSphereCappedCone()

void DrawWireSphereCappedCone ( FPrimitiveDrawInterface PDI,
const FTransform Transform,
double  ConeLength,
double  ConeAngle,
int32  ConeSides,
int32  ArcFrequency,
int32  CapSegments,
const FLinearColor Color,
uint8  DepthPriority 
)

Draws a wireframe cone with a arcs on the cap

Parameters
PDIDraw interface.
TransformGeneric transform to apply (ex. a local-to-world transform).
ConeLengthPre-transform distance from apex to the perimeter of the cone base. The Radius of the base is ConeLength * sin(ConeAngle).
ConeAngleAngle of the cone in degrees. This is 1/2 the cone aperture.
ConeSidesNumbers of sides that the cone has.
ArcFrequencyHow frequently to draw an arc (1 means every vertex, 2 every 2nd etc.)
CapSegmentsHow many lines to use to make the arc
ColorColor of the cone.
DepthPriorityDepth priority for the cone.

◆ DrawWireStar()

void DrawWireStar ( class FPrimitiveDrawInterface PDI,
const FVector Position,
float  Size,
const FLinearColor Color,
uint8  DepthPriority 
)

Draws a axis-aligned 3 line star.

Parameters
PDIDraw interface.
PositionPosition of the star.
SizeSize of the star
InColorColor of the arrow.
DepthPriorityDepth priority for the star.

◆ GetBoxMesh()

void GetBoxMesh ( const FMatrix BoxToWorld,
const FVector Radii,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriorityGroup,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetCapsuleMesh()

void GetCapsuleMesh ( const FVector Origin,
const FVector XAxis,
const FVector YAxis,
const FVector ZAxis,
const FLinearColor Color,
double  Radius,
double  HalfHeight,
int32  NumSides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bDisableBackfaceCulling,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetConeMesh()

void GetConeMesh ( const FMatrix LocalToWorld,
float  AngleWidth,
float  AngleHeight,
uint32  NumSides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetCylinderMesh() [1/3]

void GetCylinderMesh ( const FMatrix CylToWorld,
const FVector Base,
const FVector XAxis,
const FVector YAxis,
const FVector ZAxis,
double  Radius,
double  HalfHeight,
uint32  Sides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetCylinderMesh() [2/3]

void GetCylinderMesh ( const FVector Base,
const FVector XAxis,
const FVector YAxis,
const FVector ZAxis,
double  Radius,
double  HalfHeight,
int32  Sides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetCylinderMesh() [3/3]

void GetCylinderMesh ( const FVector Start,
const FVector End,
double  Radius,
int32  Sides,
const FMaterialRenderProxy MaterialInstance,
uint8  DepthPriority,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetDiscMesh() [1/2]

void GetDiscMesh ( const FMatrix ToWorld,
const FVector Center,
const FVector XAxis,
const FVector YAxis,
double  Radius,
int32  Sides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetDiscMesh() [2/2]

void GetDiscMesh ( const FVector Center,
const FVector XAxis,
const FVector YAxis,
double  Radius,
int32  Sides,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
int32  ViewIndex,
FMeshElementCollector Collector,
HHitProxy HitProxy 
)

◆ GetHalfSphereMesh()

void GetHalfSphereMesh ( const FVector Center,
const FVector Radii,
int32  NumSides,
int32  NumRings,
float  StartAngle,
float  EndAngle,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bDisableBackfaceCulling,
int32  ViewIndex,
FMeshElementCollector Collector,
bool  bUseSelectionOutline,
HHitProxy HitProxy 
)

◆ GetOrientedHalfSphereMesh()

void GetOrientedHalfSphereMesh ( const FVector Center,
const FRotator Orientation,
const FVector Radii,
int32  NumSides,
int32  NumRings,
float  StartAngle,
float  EndAngle,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bDisableBackfaceCulling,
int32  ViewIndex,
FMeshElementCollector Collector,
bool  bUseSelectionOutline,
HHitProxy HitProxy 
)

◆ GetSelectionColor()

FLinearColor GetSelectionColor ( const FLinearColor BaseColor,
bool  bSelected,
bool  bHovered,
bool  bUseOverlayIntensity = true 
)

Given a base color and a selection state, returns a color which accounts for the selection state.

Parameters
BaseColor- The base color of the object.
bSelected- The selection state of the object.
bHovered- True if the object has hover focus
bUseOverlayIntensity- True if the selection color should be modified by the selection intensity
Returns
The color to draw the object with, accounting for the selection state

◆ GetSphereMesh() [1/2]

void GetSphereMesh ( const FVector Center,
const FVector Radii,
int32  NumSides,
int32  NumRings,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bDisableBackfaceCulling,
int32  ViewIndex,
FMeshElementCollector Collector 
)

◆ GetSphereMesh() [2/2]

ENGINE_API void GetSphereMesh ( const FVector Center,
const FVector Radii,
int32  NumSides,
int32  NumRings,
const FMaterialRenderProxy MaterialRenderProxy,
uint8  DepthPriority,
bool  bDisableBackfaceCulling,
int32  ViewIndex,
FMeshElementCollector Collector,
bool  bUseSelectionOutline,
HHitProxy HitProxy 
)
extern

◆ GetViewSelectionColor()

FLinearColor GetViewSelectionColor ( const FLinearColor BaseColor,
const FSceneView View,
bool  bSelected,
bool  bHovered,
bool  bUseOverlayIntensity,
bool  bIndividuallySelected 
)

◆ IsRichView()

bool IsRichView ( const FSceneViewFamily ViewFamily)

Returns true if the given view is "rich", and all primitives should be forced down the dynamic drawing path so that ApplyViewModeOverrides can implement the rich view feature. A view is rich if is missing the EngineShowFlags.Materials showflag, or has any of the render mode affecting showflags.

◆ IsUVOutOfBounds()

bool IsUVOutOfBounds ( FVector2D  UV)