10 constexpr U32 g_partitionSize = 256;
14 F32 const dt = Time::MicrosecondsToSeconds<F32>(deltaTimeUS);
26 for (
U32 i = start; i < end; ++i) {
28 acc.
xyz = (acc + globalA).xyz;
31 for (
U32 i = start; i < end; ++i) {
33 vel.
xyz = (vel + dt * acceleration[i]).xyz;
37 for (
U32 i = start; i < end; ++i) {
39 pos.
xyz = (pos + dt * velocity[i]).xyz;
Container to store data for a given set of particles.
vector< vec4< F32 > > _acceleration
x,y,z = _acceleration; w = weight;
vector< vec4< F32 > > _position
x,y,z = position; w = size
U32 aliveCount() const noexcept
vector< vec4< F32 > > _velocity
x,y,z = _velocity; w = angle;
void update(U64 deltaTimeUS, ParticleData &p) override
vec3< F32 > _globalAcceleration
PlatformContext & context() noexcept
Handle console commands that start with a forward slash.
eastl::vector< Type > vector
void Parallel_For(TaskPool &pool, const ParallelForDescriptor &descriptor, const DELEGATE< void, const Task *, U32, U32 > &cbk)
U32 _partitionSize
How many elements should we process per async task.
U32 _iterCount
For loop iteration count.