Navigation
API > API/Runtime > API/Runtime/GeometryFramework > API/Runtime/GeometryFramework/UDynamicMeshComponent
Description
Support for specifying per-triangle colors as vertex colors. This allows external code to dynamically override the vertex colors on the rendered mesh. The lambda that is passed is held for the lifetime of the Component and must remain valid. A Material that uses the vertex colors must be applied, otherwise setting this override will have no visible effect. If the colors change externally, FastNotifyColorsUpdated() can be used to do the minimal vertex buffer updates necessary in the RenderProxy Set an active triangle color function if one exists, and update the mesh
| Name | SetTriangleColorFunction |
| Type | function |
| Header File | /Engine/Source/Runtime/GeometryFramework/Public/Components/DynamicMeshComponent.h |
| Include Path | #include "Components/DynamicMeshComponent.h" |
| Source | /Engine/Source/Runtime/GeometryFramework/Private/Components/DynamicMeshComponent.cpp |
virtual void SetTriangleColorFunction
(
TUniqueFunction < FColor *, int)> TriangleColorFuncIn,
EDynamicMeshComponentRenderUpdateMode UpdateMode
)