| 65 | } |
| 66 | |
| 67 | void ParticleController::UpdateSystemMotion(float ctrlTime) |
| 68 | { |
| 69 | auto particles = static_cast<Particles*>(mObject); |
| 70 | |
| 71 | float dSize = ctrlTime * systemSizeChange; |
| 72 | particles->SetSizeAdjust(particles->GetSizeAdjust() + dSize); |
| 73 | if (particles->GetSizeAdjust() < 0.0f) |
| 74 | { |
| 75 | particles->SetSizeAdjust(0.0f); |
| 76 | } |
| 77 | |
| 78 | float distance = ctrlTime * systemLinearSpeed; |
| 79 | Vector3<float> currentTrn = particles->localTransform.GetTranslation(); |
| 80 | Vector3<float> deltaTrn = distance * systemLinearAxis; |
| 81 | particles->localTransform.SetTranslation(currentTrn + deltaTrn); |
| 82 | |
| 83 | float angle = ctrlTime * systemAngularSpeed; |
| 84 | Matrix3x3<float> currentRot; |
| 85 | particles->localTransform.GetRotation(currentRot); |
| 86 | Matrix3x3<float> deltaRot = |
| 87 | Rotation<3, float>(AxisAngle<3, float>(systemAngularAxis, angle)); |
| 88 | particles->localTransform.SetRotation(deltaRot * currentRot); |
| 89 | } |
| 90 | |
| 91 | void ParticleController::UpdatePointMotion(float ctrlTime) |
| 92 | { |
nothing calls this directly
no test coverage detected