Hello.
I’ve recently become interested in game engines, especially physics engine implementations, so I’m reading Unreal Engine code. I have a question about something I don’t understand.
Engine/Source/Runtime/Core/Public/Math/Aossoa.isph
The code in question is the AoSoA conversion logic. I understand that it should be divided into 16 sections based on TARGET_WIDTH, with index ranges of 0-15, 16-31, 32-47, and 48-63. However, the last line uses DstPtr[64] instead of DstPtr[63]. It may depend on the size of the array passed to DstPtr, but I’m wondering if this is an unintended out-of-bounds access.
If 64 was used intentionally, I’d be curious to know why, and could you please check for any typos?
Thank you. Have a nice day! ![]()