![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshRenderBufferSet.h>
Public Attributes | |
| FColor | ConstantVertexColor = FColor::White |
| bool | bIgnoreVertexColors = false |
| bool | bUsePerTriangleColor = false |
| TFunction< FColor(const FDynamicMesh3 *, int)> | PerTriangleColorFunc = nullptr |
| bool | bApplyVertexColorRemapping = false |
| TUniqueFunction< void(FVector4f &)> | VertexColorRemappingFunc = nullptr |
| EDynamicMeshVertexColorTransformMode | ColorSpaceTransformMode = EDynamicMeshVertexColorTransformMode::NoTransform |
| bool | bUsePerTriangleNormals = false |
| bool | bUseSecondaryTriBuffers = false |
| TUniqueFunction< bool(const FDynamicMesh3 *, int32)> | SecondaryTriFilterFunc = nullptr |
Parameters and accompanying functions used to build and update FMeshRenderBuffers from a dynamic mesh. For usage, see FBaseDynamicMeshSceneProxy or the simple converter below FDynamicMeshComponentToMeshRenderBufferSet
Note: This is low-level and methods assume, but do not check, all input data is consistent (e.g. that all overlays, the triangle count and enumerator are all consistent with the provided mesh. )
|
inline |
Get the overlay color the FColor, respecting the ColorSpaceTransformMode utilizing the VertexColorRemappingFunc if requested.
|
inline |
Initialize rendering buffers from given attribute overlays. Creates three vertices per triangle, IE no shared vertices in buffers.
| void FMeshRenderBufferSetConversionUtil::InitializeBuffersFromOverlays | ( | FMeshRenderBufferSet * | RenderBuffers, |
| const FDynamicMesh3 * | Mesh, | ||
| int | NumTriangles, | ||
| const TriangleEnumerable & | Enumerable, | ||
| const TArray< const FDynamicMeshUVOverlay *, UVOverlayListAllocator > & | UVOverlays, | ||
| const FDynamicMeshNormalOverlay * | NormalOverlay, | ||
| const FDynamicMeshColorOverlay * | ColorOverlay, | ||
| TFunctionRef< void(int, int, int, const FVector3f &, FVector3f &, FVector3f &)> | TangentsFunc, | ||
| bool | bTrackTriangles = false, |
||
| bool | bParallel = false |
||
| ) |
Initialize rendering buffers from given attribute overlays. Creates three vertices per triangle, IE no shared vertices in buffers.
| void FMeshRenderBufferSetConversionUtil::RecomputeRenderBufferTriangleIndexSets | ( | FMeshRenderBufferSet * | RenderBuffers, |
| const FDynamicMesh3 * | Mesh | ||
| ) |
RecomputeRenderBufferTriangleIndexSets re-sorts the existing set of triangles in a FMeshRenderBufferSet into primary and secondary index buffers. Note that UploadIndexBufferUpdate() must be called after this function!
| void FMeshRenderBufferSetConversionUtil::UpdateSecondaryTriangleBuffer | ( | FMeshRenderBufferSet * | RenderBuffers, |
| const FDynamicMesh3 * | Mesh, | ||
| bool | bDuplicate | ||
| ) |
------------— FMeshRenderBufferSetConversionUtil ---------------— ///
Filter the triangles in a FMeshRenderBufferSet into the SecondaryIndexBuffer. Requires that RenderBuffers->Triangles has been initialized.
| bDuplicate | if set, then primary IndexBuffer is unmodified and SecondaryIndexBuffer contains duplicates. Otherwise triangles are sorted via predicate into either primary or secondary. |
| void FMeshRenderBufferSetConversionUtil::UpdateVertexBuffersFromOverlays | ( | FMeshRenderBufferSet * | RenderBuffers, |
| const FDynamicMesh3 * | Mesh, | ||
| int | NumTriangles, | ||
| const TriangleEnumerable & | Enumerable, | ||
| const FDynamicMeshNormalOverlay * | NormalOverlay, | ||
| const FDynamicMeshColorOverlay * | ColorOverlay, | ||
| TFunctionRef< void(int, int, int, const FVector3f &, FVector3f &, FVector3f &)> | TangentsFunc, | ||
| bool | bUpdatePositions = true, |
||
| bool | bUpdateNormals = false, |
||
| bool | bUpdateColors = false |
||
| ) |
Update vertex positions/normals/colors of an existing set of render buffers. Assumes that buffers were created with unshared vertices, ie three vertices per triangle, eg by InitializeBuffersFromOverlays()
| void FMeshRenderBufferSetConversionUtil::UpdateVertexUVBufferFromOverlays | ( | FMeshRenderBufferSet * | RenderBuffers, |
| const FDynamicMesh3 * | Mesh, | ||
| int32 | NumTriangles, | ||
| const TriangleEnumerable & | Enumerable, | ||
| const TArray< const FDynamicMeshUVOverlay *, UVOverlayListAllocator > & | UVOverlays | ||
| ) |
Update vertex uvs of an existing set of render buffers. Assumes that buffers were created with unshared vertices, ie three vertices per triangle, eg by InitializeBuffersFromOverlays()
If true, VertexColorRemappingFunc is called on Vertex Colors provided from Mesh to remap them to a different color
If true, vertex colors on the FDynamicMesh will be ignored
If true, a per-triangle color is used to set vertex colors
If true, a facet normals are used instead of mesh normals
If true, populate secondary buffers using SecondaryTriFilterFunc
| EDynamicMeshVertexColorTransformMode FMeshRenderBufferSetConversionUtil::ColorSpaceTransformMode = EDynamicMeshVertexColorTransformMode::NoTransform |
Color Space Transform/Conversion applied to Vertex Colors provided from Mesh Color Overlay Attribute Color Space Conversion is applied after any Vertex Color Remapping.
| FColor FMeshRenderBufferSetConversionUtil::ConstantVertexColor = FColor::White |
Constant color assigned to vertices if no other vertex color is specified
| TFunction<FColor(const FDynamicMesh3*, int)> FMeshRenderBufferSetConversionUtil::PerTriangleColorFunc = nullptr |
Per-triangle color function. Only called if bUsePerTriangleColor=true
| TUniqueFunction<bool(const FDynamicMesh3*, int32)> FMeshRenderBufferSetConversionUtil::SecondaryTriFilterFunc = nullptr |
Filter predicate for secondary triangle index buffer. Only called if bUseSecondaryTriBuffers=true
| TUniqueFunction<void(FVector4f&)> FMeshRenderBufferSetConversionUtil::VertexColorRemappingFunc = nullptr |
Vertex color remapping function. Only called if bApplyVertexColorRemapping == true, for mesh vertex colors