UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FLineBuilder Struct Reference

Public Member Functions

 FLineBuilder (FSlateRenderBatch &InRenderBatch, const FSlateRenderTransform &InRenderTransform, float ElementScale, float HalfThickness, float FilterRadius, float MiterAngleLimit, float InDashLength, float InDashOffset)
 
void NumElements (const TArray< FVector2f > &Points, uint32 &OutNumVertex, uint32 &OutNumIndex)
 
void BuildLineGeometry (const TArray< FVector2f > &Points, const TArray< FColor > &PackedColors, const FColor &PackedTint, ESlateVertexRounding Rounding)
 

Static Public Member Functions

static void AddQuadIndices (FSlateRenderBatch &InRenderBatch)
 

Detailed Description

Utility class that builds triangle strips for antialiased lines

Constructor & Destructor Documentation

◆ FLineBuilder()

FLineBuilder::FLineBuilder ( FSlateRenderBatch InRenderBatch,
const FSlateRenderTransform InRenderTransform,
float  ElementScale,
float  HalfThickness,
float  FilterRadius,
float  MiterAngleLimit,
float  InDashLength,
float  InDashOffset 
)
inline

Constructor

Parameters
ElementScaleElement layout scale, used to convert screenspace thickness/radius.
HalfThicknessHalf thickness of the lines in screenspace pixels.
FilterRadiusAntialiasing filter radius in screenspace pixels.
AngleCosineLimitMiter Angle Limit after being passed through AngleCosine.

Member Function Documentation

◆ AddQuadIndices()

static void FLineBuilder::AddQuadIndices ( FSlateRenderBatch InRenderBatch)
inlinestatic

Add a quad using the last four vertices added to the batch

Topology: 1–3 |\ | | | 0–2

◆ BuildLineGeometry()

void FLineBuilder::BuildLineGeometry ( const TArray< FVector2f > &  Points,
const TArray< FColor > &  PackedColors,
const FColor PackedTint,
ESlateVertexRounding  Rounding 
)
inline

Build geometry for each line segment between the passed-in points. Segments are represented by trapezoids with a pair of edges parallel to the segment. Each trapezoid connects to those for neighbouring segments if it's possible to miter the join cleanly. Rectangular caps are added to antialias any open ends.

All quads are built using two triangles. The UV coordinates are based on topology only, not modified by vertex position. This is why each antialiased edge is kept parallel to the opposite side. Not doing so would result in the UVs shearing apart at the diagonal where the two triangles meet.

◆ NumElements()

void FLineBuilder::NumElements ( const TArray< FVector2f > &  Points,
uint32 OutNumVertex,
uint32 OutNumIndex 
)
inline

Calculate num elements per line


The documentation for this struct was generated from the following file: