3 ms·
This sounds like you want to use ranges, which were introduced in C++20 and quite a few game developers found them too complicated. The way I see it to store y
by daemin 7y ago
This sounds like you want to use ranges, which were introduced in C++20 and quite a few game developers found them too complicated.
The way I see it to store your data in whatever is the most efficient form for your computations to use, and use a simple view for those functions. Then for functions which need to look at the data in another form you use more complicated views which can abstract some of the data layout for you and make it simpler to manipulate.
Unfortunately I can see some people decrying this sort of code as too complex and complicated, but I think it can be made to work rather well.