Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | ULineBatchComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/LineBatchComponent.h |
| Include Path | #include "Components/LineBatchComponent.h" |
Syntax
UCLASS (MinimalAPI)
class ULineBatchComponent : public UPrimitiveComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → ULineBatchComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULineBatchComponent
(
const FObjectInitializer& ObjectInitializer |
Components/LineBatchComponent.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| INVALID_ID | uint32 | Defines the value for an invalid id | Components/LineBatchComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BatchedLines | TArray< FBatchedLine > | Buffer of lines to draw | Components/LineBatchComponent.h | |
| BatchedMeshes | TArray< FBatchedMesh > | Buffer of simple meshes to draw | Components/LineBatchComponent.h | |
| BatchedPoints | TArray< FBatchedPoint > | Buffer or points to draw | Components/LineBatchComponent.h | |
| bCalculateAccurateBounds | uint32 | Whether to calculate a tight accurate bounds (encompassing all points), or use a giant bounds that is fast to compute. | Components/LineBatchComponent.h | |
| DefaultLifeTime | float | Default time that lines/points will draw for | Components/LineBatchComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearBatch
(
uint32 InBatchID |
Remove batched lines, points and meshes with given ID | Components/LineBatchComponent.h | |
void DrawBox
(
const FVector& Center, |
Draw a box | Components/LineBatchComponent.h | |
void DrawBox
(
const FVector& Center, |
Draw a box | Components/LineBatchComponent.h | |
void DrawBox
(
const FBox& Box, |
Draw a box | Components/LineBatchComponent.h | |
void DrawCapsule
(
const FVector& Center, |
Draw a cone | Components/LineBatchComponent.h | |
void DrawCircle
(
const FVector& Base, |
Draw a circle | Components/LineBatchComponent.h | |
void DrawCone
(
const FVector& Origin, |
Draw a cone | Components/LineBatchComponent.h | |
void DrawCylinder
(
const FVector& Start, |
Draw a cylinder | Components/LineBatchComponent.h | |
void DrawDirectionalArrow
(
const FVector& LineStart, |
Draw an arrow | Components/LineBatchComponent.h | |
void DrawDirectionalArrow
(
const FMatrix& ArrowToWorld, |
Draw an arrow | Components/LineBatchComponent.h | |
virtual void DrawLine
(
const FVector& Start, |
Components/LineBatchComponent.h | ||
void DrawLines
(
TArrayView< FBatchedLine > InLines |
Provide many lines to draw - faster than calling DrawLine many times. | Components/LineBatchComponent.h | |
| Draw a mesh | Components/LineBatchComponent.h | ||
virtual void DrawPoint
(
const FVector& Position, |
Components/LineBatchComponent.h | ||
void DrawSolidBox
(
FBox const& Box, |
Draw a box | Components/LineBatchComponent.h | |
void DrawSphere
(
const FVector& Center, |
Draw a sphere | Components/LineBatchComponent.h | |
void Flush() |
Clear all batched lines, points and meshes | Components/LineBatchComponent.h |
Overridden from UPrimitiveComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FPrimitiveSceneProxy * CreateSceneProxy() |
Creates a new scene proxy for the line batcher component. | Components/LineBatchComponent.h |
Overridden from USceneComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FBoxSphereBounds CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | Components/LineBatchComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyWorldOffset
(
const FVector& InOffset, |
Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location | Components/LineBatchComponent.h | |
virtual void TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. | Components/LineBatchComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddCircle
(
const FVector& Base, |
Components/LineBatchComponent.h | ||
void AddHalfCircle
(
const FVector& Base, |
Components/LineBatchComponent.h |