/Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/MeshAttributeUtil.h
Compact the values of an integer Triangle Attribute, ie so that the attribute values are dense in range 0..N. Useful for (eg) compacting MaterialIDs or Polygroups. Note that this function cannot tell if values were removed from the "end" of the attribute value list. Some care must be taken in calling code to handle this case if using this function to determine whether compaction of other data structures is needed. Currently OldToNewMapOut and NewToOldMapOut are always populated even if the input is compact.
true on success (including if already compact). false if any Attribute Values were negative/InvalidID, cannot compact in this case
namespace UE { namespace Geometry { bool UE::Geometry::CompactAttributeValues ( const [FDynamicMesh3](API\Runtime\GeometryCore\DynamicMesh\FDynamicMesh3) & Mesh, [TDynamicMeshScalarTriangleAttribute](API\Runtime\GeometryCore\DynamicMesh\TDynamicMeshScalarTriangleAttrib-)< int32 > & TriangleAttrib, [FInterval1i](API\Runtime\GeometryCore\FInterval1i) & OldMaxAttributeRangeOut, int & NewMaxAttributeValueOut, [TArray](API\Runtime\Core\Containers\TArray)< int32 > & OldToNewMapOut, [TArray](API\Runtime\Core\Containers\TArray)< int32 > & NewToOldMapOut, bool & bWasCompactOut ) } }