A utility used to construct dynamically generated meshes, and render them to a FPrimitiveDrawInterface. 更多...
#include <DynamicMeshBuilder.h>
Public 成员函数 | |
| ENGINE_API void | AddTriangle (int32 V0, int32 V1, int32 V2) |
| Adds a triangle to the mesh. | |
| ENGINE_API void | AddTriangles (const TArray< uint32 > &InIndices) |
| Add many indices to the mesh. | |
| ENGINE_API int32 | AddVertex (const FDynamicMeshVertex &InVertex) |
| Adds a vertex to the mesh. | |
| ENGINE_API int32 | AddVertex (const FVector &InPosition, const FVector2D &InTextureCoordinate, const FVector &InTangentX, const FVector &InTangentY, const FVector &InTangentZ, const FColor &InColor) |
| Adds a vertex to the mesh. | |
| ENGINE_API int32 | AddVertices (const TArray< FDynamicMeshVertex > &InVertices) |
| Adds many vertices to the mesh. | |
| ENGINE_API void | Draw (FPrimitiveDrawInterface *PDI, const FMatrix &LocalToWorld, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriorityGroup, bool bDisableBackfaceCulling=false, bool bReceivesDecals=true, const FHitProxyId HitProxyId=FHitProxyId()) |
| Draws the mesh to the given primitive draw interface. 更多... | |
| ENGINE_API | FDynamicMeshBuilder (ERHIFeatureLevel::Type InFeatureLevel, uint32 InNumTexCoords=1, uint32 InLightmapCoordinateIndex=0, bool InUse16bitTexCoord=false, FDynamicMeshBufferAllocator *InDynamicMeshBufferAllocator=nullptr) |
| Initialization constructor. | |
| ENGINE_API void | GetMesh (const FMatrix &LocalToWorld, const FMaterialRenderProxy *MaterialRenderProxy, uint8 DepthPriorityGroup, bool bDisableBackfaceCulling, bool bReceivesDecals, int32 ViewIndex, FMeshElementCollector &Collector) |
| Adds a mesh of what's been built so far to the collector. | |
| ENGINE_API void | ReserveTriangles (int32 InNumTriangles) |
| Pre-allocate space for the given number of triangles. | |
| ENGINE_API void | ReserveVertices (int32 InNumVertices) |
| Pre-allocate space for the given number of vertices. | |
| ENGINE_API | ~FDynamicMeshBuilder () |
| Destructor. | |
A utility used to construct dynamically generated meshes, and render them to a FPrimitiveDrawInterface.
Note: This is meant to be easy to use, not fast. It moves the data around more than necessary, and requires dynamically allocating RHI resources. Exercise caution.
| ENGINE_API void FDynamicMeshBuilder::Draw | ( | FPrimitiveDrawInterface * | PDI, |
| const FMatrix & | LocalToWorld, | ||
| const FMaterialRenderProxy * | MaterialRenderProxy, | ||
| uint8 | DepthPriorityGroup, | ||
| bool | bDisableBackfaceCulling = false, |
||
| bool | bReceivesDecals = true, |
||
| const FHitProxyId | HitProxyId = FHitProxyId() |
||
| ) |
Draws the mesh to the given primitive draw interface.
| PDI | - The primitive draw interface to draw the mesh on. |
| LocalToWorld | - The local to world transform to apply to the vertices of the mesh. |
| FMaterialRenderProxy | - The material instance to render on the mesh. |
| DepthPriorityGroup | - The depth priority group to render the mesh in. |
| HitProxyId | - Hit proxy to use for this mesh. Use INDEX_NONE for no hit proxy. |