![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <BatchedElements.h>
Classes | |
| class | FAllocationInfo |
Static Public Member Functions | |
| static ENGINE_API FSceneView | CreateProxySceneView (const FMatrix &ProjectionMatrix, const FIntRect &ViewRect) |
Batched elements for later rendering.
| FBatchedElements::FBatchedElements | ( | ) |
Constructor
| void FBatchedElements::AddAllocationInfo | ( | FAllocationInfo & | AllocationInfo | ) | const |
Accumulates allocation info for use calling Reserve.
| void FBatchedElements::AddLine | ( | const FVector & | Start, |
| const FVector & | End, | ||
| const FLinearColor & | Color, | ||
| FHitProxyId | HitProxyId, | ||
| float | Thickness = 0.0f, |
||
| float | DepthBias = 0.0f, |
||
| bool | bScreenSpace = false |
||
| ) |
Adds a line to the batch. Note only SE_BLEND_Opaque will be used for batched line rendering.
| void FBatchedElements::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.
| void FBatchedElements::AddReserveLines | ( | int32 | NumLines, |
| bool | bDepthBiased = false, |
||
| bool | bThickLines = false |
||
| ) |
Reserves space in line vertex array
| NumLines | - number of lines to reserve space for |
| bDepthBiased | - whether reserving depth-biased lines or non-biased lines |
| bThickLines | - whether reserving regular lines or thick lines |
| void FBatchedElements::AddReserveTriangles | ( | int32 | NumMeshTriangles, |
| const FTexture * | Texture, | ||
| ESimpleElementBlendMode | BlendMode | ||
| ) |
Reserves space in index array for a mesh element for current number plus expected number.
| NumMeshTriangles | - number of triangles to reserve space for |
| Texture | - used to find the mesh element entry |
| BlendMode | - used to find the mesh element entry |
Reserves space in triangle arrays
| NumMeshTriangles | - number of triangles to reserve space for |
| Texture | - used to find the mesh element entry |
| BlendMode | - used to find the mesh element entry |
Reserves space in mesh vertex array for current number plus expected number.
| NumMeshVerts | - number of verts to reserve space for |
| Texture | - used to find the mesh element entry |
| BlendMode | - used to find the mesh element entry |
Reserves space in mesh vertex array
| NumMeshVerts | - number of verts to reserve space for |
| Texture | - used to find the mesh element entry |
| BlendMode | - used to find the mesh element entry |
| void FBatchedElements::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, | ||
| float | OpacityMaskRefVal | ||
| ) |
Adds a sprite to the batch.
| void FBatchedElements::AddTranslucentLine | ( | const FVector & | Start, |
| const FVector & | End, | ||
| const FLinearColor & | Color, | ||
| FHitProxyId | HitProxyId, | ||
| float | Thickness = 0.0f, |
||
| float | DepthBias = 0.0f, |
||
| bool | bScreenSpace = false |
||
| ) |
Adds a translucent line to the batch.
| void FBatchedElements::AddTriangle | ( | int32 | V0, |
| int32 | V1, | ||
| int32 | V2, | ||
| const FTexture * | Texture, | ||
| EBlendMode | BlendMode | ||
| ) |
Adds a triangle to the batch.
| void FBatchedElements::AddTriangle | ( | int32 | V0, |
| int32 | V1, | ||
| int32 | V2, | ||
| const FTexture * | Texture, | ||
| ESimpleElementBlendMode | BlendMode, | ||
| const FDepthFieldGlowInfo & | GlowInfo = FDepthFieldGlowInfo() |
||
| ) |
Adds a triangle to the batch.
| void FBatchedElements::AddTriangle | ( | int32 | V0, |
| int32 | V1, | ||
| int32 | V2, | ||
| FBatchedElementParameters * | BatchedElementParameters, | ||
| ESimpleElementBlendMode | BlendMode | ||
| ) |
Adds a triangle to the batch.
| void FBatchedElements::AddTriangleExtensive | ( | int32 | V0, |
| int32 | V1, | ||
| int32 | V2, | ||
| FBatchedElementParameters * | BatchedElementParameters, | ||
| const FTexture * | Texture, | ||
| ESimpleElementBlendMode | BlendMode, | ||
| const FDepthFieldGlowInfo & | GlowInfo = FDepthFieldGlowInfo() |
||
| ) |
Adds a triangle to the batch. Extensive version where all parameters can be passed in.
| int32 FBatchedElements::AddVertex | ( | const FVector4 & | InPosition, |
| const FVector2D & | InTextureCoordinate, | ||
| const FLinearColor & | InColor, | ||
| FHitProxyId | HitProxyId | ||
| ) |
This is for compatibility but should be avoided since it's slower due to conversions.
| int32 FBatchedElements::AddVertexf | ( | const FVector4f & | InPosition, |
| const FVector2f & | InTextureCoordinate, | ||
| const FLinearColor & | InColor, | ||
| FHitProxyId | HitProxyId | ||
| ) |
Adds a mesh vertex to the batch.
| void FBatchedElements::Append | ( | FBatchedElements & | Other | ) |
Appends contents of another batched elements into this one and clears the other one.
| void FBatchedElements::Clear | ( | ) |
Clears any batched elements
|
static |
Creates a proxy FSceneView for operations that are not tied directly to a scene but still require batched elements to be drawn.
| bool FBatchedElements::Draw | ( | FRHICommandList & | RHICmdList, |
| const FMeshPassProcessorRenderState & | DrawRenderState, | ||
| ERHIFeatureLevel::Type | FeatureLevel, | ||
| const FSceneView & | View, | ||
| bool | bHitTesting, | ||
| float | Gamma = 1.0f, |
||
| EBlendModeFilter::Type | Filter = EBlendModeFilter::All, |
||
| uint32 | NumInstances = 1 |
||
| ) | const |
Draws the batch
| View | FSceneView for shaders that need access to view constants. Non-optional to also reference its ViewProjectionMatrix and size of the ViewRect |
| bHitTesting | Whether or not we are hit testing |
| Gamma | Optional gamma override |
| DepthTexture | DepthTexture for manual depth testing with editor compositing in the pixel shader |
Helper function to return the amount of memory allocated by this class
|
inline |
| void FBatchedElements::Reserve | ( | const FAllocationInfo & | AllocationInfo | ) |
Reserves memory for all containers.
| void FBatchedElements::ReserveTriangles | ( | int32 | NumMeshTriangles, |
| const FTexture * | Texture, | ||
| ESimpleElementBlendMode | BlendMode | ||
| ) |
Reserves space in index array for a mesh element
| NumMeshTriangles | - number of triangles to reserve space for |
| Texture | - used to find the mesh element entry |
| BlendMode | - used to find the mesh element entry |
Reserves space in mesh vertex array for at least this many total verts.
| NumMeshVerts | - number of verts to reserve space for |
| Texture | - used to find the mesh element entry |
| BlendMode | - used to find the mesh element entry |