How can I use Flecs query to support the iteration for std algorithms? #900
-
Currently I am working on writing a physics simulator using auto Q = world.query<Position, Velocity, Force>();
for(auto it = Q.begin(); it != Q.end(); ++it) {
auto& [p, v, f] = *it; // Position& p, Velocity& v, Force& f
...
} So that I can access the result of the query as it was a container. I notice that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah an interface like that would be useful. Not sure when I'll get to it, but I'll look into it! |
Beta Was this translation helpful? Give feedback.
Yeah an interface like that would be useful. Not sure when I'll get to it, but I'll look into it!