Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | FDynamicMeshBuilder |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/DynamicMeshBuilder.h |
| Include Path | #include "DynamicMeshBuilder.h" |
Syntax
class FDynamicMeshBuilder
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDynamicMeshBuilder
(
ERHIFeatureLevel::Type InFeatureLevel, |
Initialization constructor. | DynamicMeshBuilder.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FDynamicMeshBuilder() |
Destructor. | DynamicMeshBuilder.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DynamicMeshBufferAllocator | FDynamicMeshBufferAllocator * | DynamicMeshBuilder.h | ||
| FeatureLevel | ERHIFeatureLevel::Type | DynamicMeshBuilder.h | ||
| IndexBuffer | FPooledDynamicMeshIndexBuffer * | DynamicMeshBuilder.h | ||
| OneFrameResources | FMeshBuilderOneFrameResources * | DynamicMeshBuilder.h | ||
| VertexBuffer | FPooledDynamicMeshVertexBuffer * | DynamicMeshBuilder.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddTriangle
(
int32 V0, |
Adds a triangle to the mesh. | DynamicMeshBuilder.h | |
void AddTriangles
(
const TArray< uint32 >& InIndices |
Add many indices to the mesh. | DynamicMeshBuilder.h | |
| Adds a vertex to the mesh. | DynamicMeshBuilder.h | ||
int32 AddVertex
(
const FDynamicMeshVertex& InVertex |
Adds a vertex to the mesh. | DynamicMeshBuilder.h | |
int32 AddVertices
(
const TArray< FDynamicMeshVertex >& InVertices |
Adds many vertices to the mesh. | DynamicMeshBuilder.h | |
void Draw
(
FPrimitiveDrawInterface* PDI, |
Draws the mesh to the given primitive draw interface. | DynamicMeshBuilder.h | |
void GetMesh
(
const FMatrix& LocalToWorld, |
Adds a mesh of what's been built so far to the collector. | DynamicMeshBuilder.h | |
void GetMesh
(
const FMatrix& LocalToWorld, |
DynamicMeshBuilder.h | ||
void GetMesh
(
const FMatrix& LocalToWorld, |
DynamicMeshBuilder.h | ||
void GetMesh
(
const FMatrix& LocalToWorld, |
DynamicMeshBuilder.h | ||
void GetMesh
(
const FMatrix& LocalToWorld, |
DynamicMeshBuilder.h | ||
void GetMeshElement
(
const FPrimitiveUniformShaderParameters& PrimitiveParams, |
DynamicMeshBuilder.h | ||
void GetMeshElement
(
const FMatrix& LocalToWorld, |
DynamicMeshBuilder.h | ||
void ReserveTriangles
(
int32 InNumTriangles |
Pre-allocate space for the given number of triangles. | DynamicMeshBuilder.h | |
void ReserveVertices
(
int32 InNumVertices |
Pre-allocate space for the given number of vertices. | DynamicMeshBuilder.h |