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.
| 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 |
| 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 |
| 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.
| 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
| Transform | The transform matrix for each viewport (View->ViewProjectionMatrix) |
| ViewportSizeX | The width of the viewport |
| ViewportSizeY | The height of the viewport |
| bHitTesting | Whether or not we are hit testing |
| Gamma | Optional gamma override |
| View | Optional FSceneView for shaders that need access to view constants |
| DepthTexture | DepthTexture for manual depth testing with editor compositing in the pixel shader |
| 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
| 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 |
|
inline |
Helper function to return the amount of memory allocated by this class
| 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 |
| 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 |