engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
FBatchedElements类 参考

Batched elements for later rendering. 更多...

#include <BatchedElements.h>

Public 成员函数

void 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. 更多...
 
void AddPoint (const FVector &Position, float Size, const FLinearColor &Color, FHitProxyId HitProxyId)
 Adds a point to the batch. 更多...
 
void AddReserveLines (int32 NumLines, bool bDepthBiased=false, bool bThickLines=false)
 Reserves space in line vertex array 更多...
 
void AddReserveTriangles (int32 NumMeshTriangles, const FTexture *Texture, ESimpleElementBlendMode BlendMode)
 Reserves space in index array for a mesh element for current number plus expected number. 更多...
 
void AddReserveVertices (int32 NumMeshVerts)
 Reserves space in mesh vertex array for current number plus expected number. 更多...
 
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=SE_BLEND_Masked)
 Adds a sprite to the batch.
 
void 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 AddTriangle (int32 V0, int32 V1, int32 V2, const FTexture *Texture, EBlendMode BlendMode)
 Adds a triangle to the batch.
 
void AddTriangle (int32 V0, int32 V1, int32 V2, const FTexture *Texture, ESimpleElementBlendMode BlendMode, const FDepthFieldGlowInfo &GlowInfo=FDepthFieldGlowInfo())
 Adds a triangle to the batch.
 
void AddTriangle (int32 V0, int32 V1, int32 V2, FBatchedElementParameters *BatchedElementParameters, ESimpleElementBlendMode BlendMode)
 Adds a triangle to the batch.
 
void AddTriangleExtensive (int32 V0, int32 V1, int32 V2, FBatchedElementParameters *BatchedElementParameters, const FTexture *Texture, ESimpleElementBlendMode BlendMode, const FDepthFieldGlowInfo &GlowInfo=FDepthFieldGlowInfo())
 Adds a triangle to the batch. 更多...
 
int32 AddVertex (const FVector4 &InPosition, const FVector2D &InTextureCoordinate, const FLinearColor &InColor, FHitProxyId HitProxyId)
 Adds a mesh vertex to the batch.
 
void Clear ()
 Clears any batched elements
 
bool Draw (FRHICommandList &RHICmdList, const FMeshPassProcessorRenderState &DrawRenderState, ERHIFeatureLevel::Type FeatureLevel, bool bNeedToSwitchVerticalAxis, const FMatrix &Transform, uint32 ViewportSizeX, uint32 ViewportSizeY, bool bHitTesting, float Gamma=1.0f, const FSceneView *View=nullptr, EBlendModeFilter::Type Filter=EBlendModeFilter::All) const
 Draws the batch 更多...
 
bool Draw (FRHICommandList &RHICmdList, const FMeshPassProcessorRenderState &DrawRenderState, ERHIFeatureLevel::Type FeatureLevel, bool bNeedToSwitchVerticalAxis, const FSceneView &View, bool bHitTesting, float Gamma=1.0f, EBlendModeFilter::Type Filter=EBlendModeFilter::All) const
 Draws the batch 更多...
 
 FBatchedElements ()
 Constructor
 
FORCEINLINE uint32 GetAllocatedSize (void) const
 Helper function to return the amount of memory allocated by this class 更多...
 
void ReserveTriangles (int32 NumMeshTriangles, const FTexture *Texture, ESimpleElementBlendMode BlendMode)
 Reserves space in index array for a mesh element 更多...
 
void ReserveVertices (int32 NumMeshVerts)
 Reserves space in mesh vertex array for at least this many total verts. 更多...
 

静态 Public 成员函数

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.
 

详细描述

Batched elements for later rendering.

成员函数说明

◆ AddLine()

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.

◆ AddPoint()

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.

◆ AddReserveLines()

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

◆ AddReserveTriangles()

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

◆ AddReserveVertices()

void FBatchedElements::AddReserveVertices ( int32  NumMeshVerts)

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

◆ AddTriangleExtensive()

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.

◆ Draw() [1/2]

bool FBatchedElements::Draw ( FRHICommandList &  RHICmdList,
const FMeshPassProcessorRenderState &  DrawRenderState,
ERHIFeatureLevel::Type  FeatureLevel,
bool  bNeedToSwitchVerticalAxis,
const FMatrix &  Transform,
uint32  ViewportSizeX,
uint32  ViewportSizeY,
bool  bHitTesting,
float  Gamma = 1.0f,
const FSceneView *  View = nullptr,
EBlendModeFilter::Type  Filter = EBlendModeFilter::All 
) const

Draws the batch

参数
TransformThe transform matrix for each viewport (View->ViewProjectionMatrix)
ViewportSizeXThe width of the viewport
ViewportSizeYThe height of the viewport
bHitTestingWhether or not we are hit testing
GammaOptional gamma override
ViewOptional FSceneView for shaders that need access to view constants
DepthTextureDepthTexture for manual depth testing with editor compositing in the pixel shader

◆ Draw() [2/2]

bool FBatchedElements::Draw ( FRHICommandList &  RHICmdList,
const FMeshPassProcessorRenderState &  DrawRenderState,
ERHIFeatureLevel::Type  FeatureLevel,
bool  bNeedToSwitchVerticalAxis,
const FSceneView &  View,
bool  bHitTesting,
float  Gamma = 1.0f,
EBlendModeFilter::Type  Filter = EBlendModeFilter::All 
) const

Draws the batch

参数
ViewFSceneView for shaders that need access to view constants. Non-optional to also reference its ViewProjectionMatrix and size of the ViewRect
bHitTestingWhether or not we are hit testing
GammaOptional gamma override
DepthTextureDepthTexture for manual depth testing with editor compositing in the pixel shader

◆ GetAllocatedSize()

FORCEINLINE uint32 FBatchedElements::GetAllocatedSize ( void  ) const
inline

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

返回
number of bytes allocated by this container

◆ ReserveTriangles()

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

◆ ReserveVertices()

void FBatchedElements::ReserveVertices ( int32  NumMeshVerts)

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

该类的文档由以下文件生成: