Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
ParticleRoundGenerator.cpp
Go to the documentation of this file.
1
2
4
5namespace Divide {
6
7void ParticleRoundGenerator::generate([[maybe_unused]] Task& packagedTasksParent,
8 [[maybe_unused]] TaskPool& parentPool,
9 [[maybe_unused]] const U64 deltaTimeUS,
10 ParticleData& p,
11 const U32 startIndex,
12 const U32 endIndex) {
13 const vec3<F32> center(_center + _sourcePosition);
14 for (U32 i = startIndex; i < endIndex; i++) {
15 const F32 ang = Random(0.0f, M_2PI_f);
16 p._position[i].xyz = center + vec3<F32>(_radX * std::sin(ang),
17 _radY * std::cos(ang),
18 0.0f);
19 }
20}
21
22} //namespace Divide
Container to store data for a given set of particles.
Definition: ParticleData.h:59
vector< vec4< F32 > > _position
x,y,z = position; w = size
Definition: ParticleData.h:68
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
T Random()
Definition: MathHelper.inl:95
constexpr F32 M_2PI_f
Definition: MathHelper.h:89
uint32_t U32
uint64_t U64
void generate(Task &packagedTasksParent, TaskPool &parentPool, U64 deltaTimeUS, ParticleData &p, U32 startIndex, U32 endIndex) override