MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / RemapArrayHelper

Function RemapArrayHelper

Source/Engine/Graphics/Models/ModelData.Tool.cpp:68–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67template<typename T>
68void RemapArrayHelper(Array<T>& target, const std::vector<uint32_t>& remap)
69{
70 if (target.HasItems())
71 {
72 Array<T> tmp;
73 tmp.Swap(target);
74 int32 size = (int32)remap.size();
75 target.Resize(size, false);
76 for (int32 i = 0; i < size; i++)
77 target[i] = tmp.At(remap[i]);
78 }
79}
80
81void MeshData::SetLightmapUVsSource(ModelLightmapUVsSource source)
82{

Callers 1

GenerateLightmapUVsMethod · 0.85

Calls 4

HasItemsMethod · 0.45
SwapMethod · 0.45
sizeMethod · 0.45
ResizeMethod · 0.45

Tested by

no test coverage detected