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