Navigation
API > API/Runtime > API/Runtime/MeshConversion
References
| Module | MeshConversion |
| Header | /Engine/Source/Runtime/MeshConversion/Public/MeshDescriptionBuilder.h |
| Include | #include "MeshDescriptionBuilder.h" |
Syntax
class FMeshDescriptionBuilder
Remarks
Utility class to construct MeshDescription instances. NB: this will add a vertex-instance UV to the Description, if it has none.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TPolygonGroupAttributesRef< FName > | GroupMaterialSlotNames | ||
| TVertexInstanceAttributesRef< float > | InstanceBiTangentSign | ||
| TVertexInstanceAttributesRef< FVector4f > | InstanceColors | ||
| TVertexInstanceAttributesRef< FVector3f > | InstanceNormals | ||
| TVertexInstanceAttributesRef< FVector3f > | InstanceTangents | ||
| TVertexInstanceAttributesRef< FVector2f > | InstanceUVs | ||
| FMeshDescription * | MeshDescription | ||
| TPolygonAttributesRef< int > | PolyGroups | ||
| TArray< FVertexID > | TempBuffer | ||
| TArray< FUVID > | TempUVBuffer | ||
| TArray< TUVAttributesRef< FVector2f > > | UVCoordinateLayers | ||
| TVertexAttributesRef< FVector3f > | VertexPositions |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FVertexInstanceID | AppendInstance
(
const FVertexID& VertexID |
Append new vertex instance and return ID | |
| FPolygonID | AppendPolygon
(
const TArray< FVertexID >& Vertices, |
Append an arbitrary polygon to the mesh with the given PolygonGroup ID Unique Vertex instances will be created for each polygon-vertex. | |
| FPolygonGroupID | AppendPolygonGroup
(
FName MaterialSlotName |
Create a new MeshDescription PolygonGroup and return it's ID. | |
| FTriangleID | AppendTriangle
(
const FVertexInstanceID& Instance0, |
Append a triangle to the mesh using the given vertex instances and PolygonGroup ID | |
| FTriangleID | AppendTriangle
(
const FVertexID& Vertex0, |
Append a triangle to the mesh with the given PolygonGroup ID | |
| FTriangleID | AppendTriangle
(
const FVertexID* Triangle, |
Append a triangle to the mesh with the given PolygonGroup ID | |
| FUVID | Append a UV 'vertex' and return a new UV ID | ||
| void | AppendUVTriangle
(
const FTriangleID& TriangleID, |
Append a UV triangle to the specified UV layer. | |
| FVertexID | AppendVertex
(
const FVector& Position |
Append vertex and return new vertex ID | |
| FBox | Return the current bounding box of the mesh | ||
| void | Enable per-triangle integer attribute named PolyTriGroups | ||
| FVector | GetPosition
(
const FVertexID& VertexID |
Return position of vertex | |
| FVector | GetPosition
(
const FVertexInstanceID& InstanceID |
Return position of vertex parent of instance | |
| void | ReserveNewUVs
(
int32 Count, |
Pre-allocate space in the mesh description for UVs in the indicated UVLayer | |
| void | ReserveNewVertices
(
int32 Count |
Pre-allocate space in the mesh description | |
| void | Enable the construction of secondary data structures in the mesh description | ||
| void | SetAllEdgesHardness
(
bool bHard |
Set MeshAttribute::Edge::IsHard to true for all edges | |
| void | SetInstanceColor
(
const FVertexInstanceID& InstanceID, |
Set the Color of a vertex instance | |
| void | SetInstanceNormal
(
const FVertexInstanceID& InstanceID, |
Set the Normal of a vertex instance | |
| void | SetInstanceTangentSpace
(
const FVertexInstanceID& InstanceID, |
Set the full tangent space of a vertex instance, this is stored as a vec3 normal, vec3 tangent, and a bitangent sign | |
| void | SetInstanceUV
(
const FVertexInstanceID& InstanceID, |
Set the UV of a vertex instance. | |
| void | SetMeshDescription
(
FMeshDescription* Description |
||
| void | SetNumUVLayers
(
int32 NumUVLayers |
Set the number of UV layers | |
| void | SetPolyGroupID
(
const FTriangleID& TriangleID, |
Set the PolyTriGroups attribute value to a specific GroupID for a Triangle | |
| void | SetPosition
(
const FVertexID& VertexID, |
Set the position of a vertex | |
| void | SetVertexAttributeValue
(
FName AttributeName, |
Set the specified value for the named attribute / vertex index combination. | |
| void | Disable the construction of secondary data structures in the mesh description | ||
| void | Translate the MeshDescription vertex positions |