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

Method Set

Source/Engine/Graphics/Models/MeshBase.cpp:94–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void MeshAccessor::Stream::Set(Span<Float2> src)
95{
96 const int32 count = GetCount();
97 ASSERT(src.Length() >= count);
98 if (IsLinear(PixelFormat::R32G32_Float))
99 {
100 Platform::MemoryCopy(_data.Get(), src.Get(), _data.Length());
101 }
102 else
103 {
104 for (int32 i = 0; i < count; i++)
105 _sampler.Write(_data.Get() + i * _stride, Float4(src.Get()[i], 0, 0));
106 }
107}
108
109void MeshAccessor::Stream::Set(Span<Float3> src)
110{

Callers 3

ReadVertexLayoutMethod · 0.45
GenerateNormalsMethod · 0.45
GenerateTangentsMethod · 0.45

Calls 4

Float4Class · 0.85
LengthMethod · 0.45
GetMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected