10 constexpr U32 s_particlesPerThread = 1024;
13 STUBBED(
"ToDo: add proper orientation support! -Ionut");
24 for (
U32 i = start; i < end; ++i) {
26 vec3<F32> force(p._acceleration[i]);
28 const F32 normalFactor = force.dot(WORLD_Y_AXIS);
29 if (normalFactor < 0.0f) {
30 force -= WORLD_Y_AXIS * normalFactor;
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
PlatformContext & context() noexcept
Handle console commands that start with a forward slash.
void Parallel_For(TaskPool &pool, const ParallelForDescriptor &descriptor, const DELEGATE< void, const Task *, U32, U32 > &cbk)
static const vec3< F32 > WORLD_Y_AXIS
U32 _partitionSize
How many elements should we process per async task.
U32 _iterCount
For loop iteration count.