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/ParticlePositionColorUpdater.cpp

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