Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 630 vs 631 for /trunk/Source Code/Dynamics/Entities/Particles/ConcreteUpdaters/ParticleVelocityColorUpdater.cpp

Diff revisions: vs.
  @@ -2,24 +2,23 @@
2 2
3 3 namespace Divide {
4 4
5 - void ParticleVelocityColorUpdater::update(const U64 deltaTime,
6 - std::shared_ptr<ParticleData> p) {
7 - const U32 endID = p->aliveCount();
5 + void ParticleVelocityColorUpdater::update(const U64 deltaTime, ParticleData& p) {
6 + const U32 endID = p.aliveCount();
8 7 F32 diffr = _maxVel.x - _minVel.x;
9 8 F32 diffg = _maxVel.y - _minVel.y;
10 9 F32 diffb = _maxVel.z - _minVel.z;
11 10
12 11 vec3<F32> floatColorRGB;
13 12 for (U32 i = 0; i < endID; ++i) {
14 - p->_color[i].set(
15 - (p->_velocity[i].x - _minVel.x) /
16 - diffr, // lerp(p->_startColor[i].r, p->_endColor[i].r, scaler),
17 - (p->_velocity[i].y - _minVel.y) /
18 - diffg, // lerp(p->_startColor[i].g, p->_endColor[i].g, scaleg),
19 - (p->_velocity[i].z - _minVel.z) /
20 - diffb, // lerp(p->_startColor[i].b, p->_endColor[i].b,
13 + p._color[i].set(
14 + (p._velocity[i].x - _minVel.x) /
15 + diffr, // lerp(p._startColor[i].r, p._endColor[i].r, scaler),
16 + (p._velocity[i].y - _minVel.y) /
17 + diffg, // lerp(p._startColor[i].g, p._endColor[i].g, scaleg),
18 + (p._velocity[i].z - _minVel.z) /
19 + diffb, // lerp(p._startColor[i].b, p._endColor[i].b,
21 20 // scaleb),
22 - Lerp(p->_startColor[i].a, p->_endColor[i].a, p->_misc[i].y) * 255.0f);
21 + Lerp(p._startColor[i].a, p._endColor[i].a, p._misc[i].y) * 255.0f);
23 22 }
24 23 }
25 24 };