ULineBatchComponent

The line batch component buffers and draws lines (and some other line-based shapes) in a scene.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/LineBatchComponent.h

Include

#include "Components/LineBatchComponent.h"

Syntax

class ULineBatchComponent : public UPrimitiveComponent

Remarks

The line batch component buffers and draws lines (and some other line-based shapes) in a scene. This can be useful for debug drawing, but is not very performant for runtime use.

Variables

Name Description

Public variable

TArray< struct ...

 

BatchedLines

Buffer of lines to draw

Public variable

TArray< struct ...

 

BatchedMeshes

Buffer of simple meshes to draw

Public variable

TArray< struct ...

 

BatchedPoints

Buffer or points to draw

Public variable

uint32: 1

 

bCalculateAccurateBounds

Whether to calculate a tight accurate bounds (encompassing all points), or use a giant bounds that is fast to compute.

Public variable

float

 

DefaultLifeTime

Default time that lines/points will draw for

Constructors

Name Description

Public function

ULineBatchComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

DrawBox

(
    const FBox& Box,
    const FMatrix& TM,
    const FColor& Color,
    uint8 InDepthPriorityGroup
)

Draw a box

Public function

void

 

DrawCircle

(
    const FVector& Base,
    const FVector& X,
    const FVector& Y,
    FColor Color,
    float Radius,
    int32 NumSides,
    uint8 DepthPriority
)

Draw a circle

Public function

void

 

DrawDirectionalArrow

(
    const FMatrix& ArrowToWorld,
    FColor InColor,
    float Length,
    float ArrowSize,
    uint8 DepthPriority
)

Draw an arrow

Public function Virtual

void

 

DrawLine

(
    const FVector& Start,
    const FVector& End,
    const FLinearColor& Color,
    uint8 DepthPriority,
    float Thickness,
    float LifeTime
)

Public function

void

 

DrawLines

(
    const TArray< FBatchedLine >& InLi...
)

Provide many lines to draw - faster than calling DrawLine many times.

Public function

void

 

DrawMesh

(
    TArray< FVector > const& Verts,
    TArray< int32 > const& Indices,
    FColor const& Color,
    uint8 DepthPriority,
    float LifeTime
)

Draw a mesh

Public function Virtual

void

 

DrawPoint

(
    const FVector& Position,
    const FLinearColor& Color,
    float PointSize,
    uint8 DepthPriority,
    float LifeTime
)

Public function

void

 

DrawSolidBox

(
    FBox const& Box,
    FTransform const& Xform,
    const FColor& Color,
    uint8 DepthPriority,
    float LifeTime
)

Draw a box

Public function

void

 

Flush()

Clear all batched lines, points and meshes

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc...

 

CreateSceneProxy()

Creates a new scene proxy for the line batcher component.

Overridden from USceneComponent

Name Description

Public function Virtual Const

FBoxSphereBo...

 

CalcBounds

(
    const FTransform& LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

ApplyWorldOffset

(
    const FVector& InOffset,
    bool bWorldShift
)

Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss