FBatchedElements

Batched elements for later rendering.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/BatchedElements.h

Include

#include "BatchedElements.h"

Syntax

class FBatchedElements

Remarks

Batched elements for later rendering.

Constructors

Name Description

Public function

FBatchedElements()

Constructor

Functions

Name Description

Public function

void

 

AddLine

(
    const FVector& Start,
    const FVector& End,
    const FLinearColor& Color,
    FHitProxyId HitProxyId,
    float Thickness,
    float DepthBias,
    bool bScreenSpace
)

Adds a line to the batch. Note only SE_BLEND_Opaque will be used for batched line rendering.

Public function

void

 

AddPoint

(
    const FVector& Position,
    float Size,
    const FLinearColor& Color,
    FHitProxyId HitProxyId
)

Adds a point to the batch. Note only SE_BLEND_Opaque will be used for batched point rendering.

Public function

void

 

AddReserveLines

(
    int32 NumLines,
    bool bDepthBiased,
    bool bThickLines
)

Reserves space in line vertex array

Public function

void

 

AddReserveTriangles

(
    int32 NumMeshTriangles,
    const FTexture* Texture,
    ESimpleElementBlendMode BlendMode
)

Reserves space in index array for a mesh element for current number plus expected number.

Public function

void

 

AddReserveVertices

(
    int32 NumMeshVerts
)

Reserves space in mesh vertex array for current number plus expected number.

Public function

void

 

AddSprite

(
    const FVector& Position,
    float SizeX,
    float SizeY,
    const FTexture* Texture,
    const FLinearColor& Color,
    FHitProxyId HitProxyId,
    float U,
    float UL,
    float V,
    float VL,
    uint8 BlendMode
)

Adds a sprite to the batch.

Public function

void

 

AddTranslucentLine

(
    const FVector& Start,
    const FVector& End,
    const FLinearColor& Color,
    FHitProxyId HitProxyId,
    float Thickness,
    float DepthBias,
    bool bScreenSpace
)

Adds a translucent line to the batch.

Public function

void

 

AddTriangle

(
    int32 V0,
    int32 V1,
    int32 V2,
    const FTexture* Texture,
    ESimpleElementBlendMode BlendMode,
    const FDepthFieldGlowInfo& GlowInf...
)

Adds a triangle to the batch.

Public function

void

 

AddTriangle

(
    int32 V0,
    int32 V1,
    int32 V2,
    FBatchedElementParameters* Bat...,
    ESimpleElementBlendMode BlendMode
)

Adds a triangle to the batch.

Public function

void

 

AddTriangle

(
    int32 V0,
    int32 V1,
    int32 V2,
    const FTexture* Texture,
    EBlendMode BlendMode
)

Adds a triangle to the batch.

Public function

void

 

AddTriangleExtensive

(
    int32 V0,
    int32 V1,
    int32 V2,
    FBatchedElementParameters* Bat...,
    const FTexture* Texture,
    ESimpleElementBlendMode BlendMode,
    const FDepthFieldGlowInfo& GlowInf...
)

Adds a triangle to the batch. Extensive version where all parameters can be passed in.

Public function

int32

 

AddVertex

(
    const FVector4& InPosition,
    const FVector2D& InTextureCoordina...,
    const FLinearColor& InColor,
    FHitProxyId HitProxyId
)

Adds a mesh vertex to the batch.

Public function

void

 

Clear()

Clears any batched elements

Public function Static

FSceneView

 

CreateProxySceneView

(
    const FMatrix& ProjectionMatrix,
    const FIntRect& ViewRect
)

Creates a proxy FSceneView for operations that are not tied directly to a scene but still require batched elements to be drawn.

Public function Const

bool

 

Draw

(
    FRHICommandList& RHICmdList,
    const FMeshPassProcessorRenderState...,
    ERHIFeatureLevel::Type FeatureLevel,
    bool bNeedToSwitchVerticalAxis,
    const FSceneView& View,
    bool bHitTesting,
    float Gamma,
    EBlendModeFilter::Type Filter
)

Draws the batch

Public function

void

 

EnableMobileHDREncoding

(
    bool bInEnableHDREncoding
)

Public function Const

uint32

 

GetAllocatedSize()

Helper function to return the amount of memory allocated by this class

Public function Const

bool

 

HasPrimsToDraw()

Public function

void

 

ReserveTriangles

(
    int32 NumMeshTriangles,
    const FTexture* Texture,
    ESimpleElementBlendMode BlendMode
)

Reserves space in index array for a mesh element

Public function

void

 

ReserveVertices

(
    int32 NumMeshVerts
)

Reserves space in mesh vertex array for at least this many total verts.

Deprecated Functions

Name Description

Public function Const

bool

 

Draw

(
    FRHICommandList& RHICmdList,
    const FMeshPassProcessorRenderState...,
    ERHIFeatureLevel::Type FeatureLevel,
    bool bNeedToSwitchVerticalAxis,
    const FMatrix& Transform,
    uint32 ViewportSizeX,
    uint32 ViewportSizeY,
    bool bHitTesting,
    float Gamma,
    const FSceneView* View,
    EBlendModeFilter::Type Filter
)

  1. Use the FBatchedElements::Draw method that takes a non-optional FSceneView parameter instead

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