MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / UpdatePointMotion

Method UpdatePointMotion

GTE/Graphics/ParticleController.cpp:91–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void ParticleController::UpdatePointMotion(float ctrlTime)
92{
93 auto particles = static_cast<Particles*>(mObject);
94 auto& posSize = particles->GetPositionSize();
95 uint32_t numActive = particles->GetNumActive();
96 for (uint32_t i = 0; i < numActive; ++i)
97 {
98 float distance = ctrlTime * mParticleLinearSpeed[i];
99 Vector3<float> deltaTrn = distance * mParticleLinearAxis[i];
100 posSize[i][0] += deltaTrn[0];
101 posSize[i][1] += deltaTrn[1];
102 posSize[i][2] += deltaTrn[2];
103 float dSize = ctrlTime * mParticleSizeChange[i];
104 posSize[i][3] += dSize;
105 }
106
107 particles->GenerateParticles(mCamera);
108 mPostUpdate(particles->GetVertexBuffer());
109}
110
111

Callers

nothing calls this directly

Calls 3

GenerateParticlesMethod · 0.80
GetNumActiveMethod · 0.45
GetVertexBufferMethod · 0.45

Tested by

no test coverage detected